Files
ComfyUI_frontend/packages/shared-frontend-utils
bymyself 0556244999 fix: harden pointer capture release and drag state for anomalous Mac events
Five pointer event handling bugs triggered by certain Mac hardware sending
isPrimary: false and spurious modifier keys (reproducible on specific MacBooks
across Safari and Chrome):

1. LGraphCanvas.processMouseUp: non-primary pointerup skipped pointer.reset()
   leaving canvas holding capture forever → UI frozen. Fix: release if pointerId
   matches the captured one.

2. useNodePointerInteractions.onPointermove: multiselect-drag branch fired on
   spurious shiftKey/metaKey even without a prior pointerdown on this node.
   Fix: add hasDraggingStarted guard.

3. useNodeResize cleanup(): pointercancel path was missing releasePointerCapture.
   Browser auto-releases on pointerup but not pointercancel. Fix: release via
   capturedPointerId in closure.

4. useNodeDrag.endDrag: never explicitly released capture; safe for pointerup
   (auto-release) but not for pointercancel. Fix: attempt release at top of endDrag.

5. useNodePointerInteractions.onPointercancel: only checked isDraggingVueNodes,
   missing hasDraggingStarted window before drag threshold. Fix: mirror onPointerup
   check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 17:08:49 -07:00
..