fix: Prevent pointer events on widgets from propagating to the containing node. (#5424)

This commit is contained in:
Alexander Brown
2025-09-07 18:45:45 -07:00
committed by snomiao
parent 7cd98494c2
commit 32ea46afdd

View File

@@ -1,4 +1,6 @@
<script setup lang="ts">
import { noop } from 'es-toolkit'
import { COMFY_VUE_NODE_DIMENSIONS } from '@/lib/litegraph/src/litegraph'
import { SimplifiedWidget } from '@/types/simplifiedWidget'
@@ -12,7 +14,7 @@ const widgetHeight = COMFY_VUE_NODE_DIMENSIONS.components.STANDARD_WIDGET_HEIGHT
<template>
<div
class="flex items-center justify-between gap-2"
class="flex items-center justify-between gap-2 overscroll-contain"
:style="{ height: widgetHeight + 'px' }"
>
<p
@@ -21,7 +23,12 @@ const widgetHeight = COMFY_VUE_NODE_DIMENSIONS.components.STANDARD_WIDGET_HEIGHT
>
{{ widget.name }}
</p>
<div class="w-75">
<div
class="w-75"
@pointerdown.stop="noop"
@pointermove.stop="noop"
@pointerup.stop="noop"
>
<slot />
</div>
</div>