mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 01:09:46 +00:00
fix: Prevent pointer events on widgets from propagating to the containing node. (#5424)
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { noop } from 'es-toolkit'
|
||||||
|
|
||||||
import { COMFY_VUE_NODE_DIMENSIONS } from '@/lib/litegraph/src/litegraph'
|
import { COMFY_VUE_NODE_DIMENSIONS } from '@/lib/litegraph/src/litegraph'
|
||||||
import { SimplifiedWidget } from '@/types/simplifiedWidget'
|
import { SimplifiedWidget } from '@/types/simplifiedWidget'
|
||||||
|
|
||||||
@@ -12,7 +14,7 @@ const widgetHeight = COMFY_VUE_NODE_DIMENSIONS.components.STANDARD_WIDGET_HEIGHT
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="flex items-center justify-between gap-2"
|
class="flex items-center justify-between gap-2 overscroll-contain"
|
||||||
:style="{ height: widgetHeight + 'px' }"
|
:style="{ height: widgetHeight + 'px' }"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
@@ -21,7 +23,12 @@ const widgetHeight = COMFY_VUE_NODE_DIMENSIONS.components.STANDARD_WIDGET_HEIGHT
|
|||||||
>
|
>
|
||||||
{{ widget.name }}
|
{{ widget.name }}
|
||||||
</p>
|
</p>
|
||||||
<div class="w-75">
|
<div
|
||||||
|
class="w-75"
|
||||||
|
@pointerdown.stop="noop"
|
||||||
|
@pointermove.stop="noop"
|
||||||
|
@pointerup.stop="noop"
|
||||||
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user