mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-15 01:48:06 +00:00
Backport of #6788 to `cloud/1.32` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6852-backport-cloud-1-32-hotfix-Stop-clicks-on-the-textarea-from-propagating-to-the-node-it-2b46d73d3650812fb44ccaf707ca38e3) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
46 lines
1.2 KiB
Vue
46 lines
1.2 KiB
Vue
<template>
|
|
<div class="widget-expands relative">
|
|
<Textarea
|
|
v-model="modelValue"
|
|
v-bind="filteredProps"
|
|
:class="
|
|
cn(WidgetInputBaseClass, 'size-full text-xs lod-toggle resize-none')
|
|
"
|
|
:placeholder="placeholder || widget.name || ''"
|
|
:aria-label="widget.name"
|
|
:readonly="widget.options?.read_only"
|
|
:disabled="widget.options?.read_only"
|
|
fluid
|
|
data-capture-wheel="true"
|
|
@pointerdown.capture.stop
|
|
/>
|
|
<LODFallback />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Textarea from 'primevue/textarea'
|
|
import { computed } from 'vue'
|
|
|
|
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
|
|
import { cn } from '@/utils/tailwindUtil'
|
|
import {
|
|
INPUT_EXCLUDED_PROPS,
|
|
filterWidgetProps
|
|
} from '@/utils/widgetPropFilter'
|
|
|
|
import LODFallback from '../../components/LODFallback.vue'
|
|
import { WidgetInputBaseClass } from './layout'
|
|
|
|
const { widget, placeholder = '' } = defineProps<{
|
|
widget: SimplifiedWidget<string>
|
|
placeholder?: string
|
|
}>()
|
|
|
|
const modelValue = defineModel<string>({ default: '' })
|
|
|
|
const filteredProps = computed(() =>
|
|
filterWidgetProps(widget.options, INPUT_EXCLUDED_PROPS)
|
|
)
|
|
</script>
|