fix: prevent node drag when selecting text in InputText widgets#8405
fix: prevent node drag when selecting text in InputText widgets#8405christian-byrne wants to merge 1 commit intomainfrom
Conversation
Add capture-phase pointer event modifiers to WidgetInputText.vue to stop pointer events from bubbling up to LGraphNode, which was initiating node drag instead of allowing text selection. Pattern matches existing fix in WidgetTextarea.vue (lines 22-24). Amp-Thread-ID: https://ampcode.com/threads/T-019c07b2-9558-7270-bb0c-d034f14f357a Co-authored-by: Amp <amp@ampcode.com>
📝 WalkthroughWalkthroughAdds pointer event handlers (pointerdown, pointermove, pointerup) with capture and stop modifiers to the InputText component to prevent event propagation. Introduces corresponding test suite verifying pointer events don't propagate from input element to wrapper. Changes
Possibly related PRs
Suggested reviewers
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright Tests:
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/29/2026, 04:43:57 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 26 kB (baseline 26 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 973 kB (baseline 973 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 471 kB (baseline 471 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 12 added / 12 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.89 kB (baseline 2.89 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 4 added / 4 removed Data & Services — 2.7 MB (baseline 2.7 MB) • 🔴 +1 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 25.3 kB (baseline 25.3 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.05 MB (baseline 7.05 MB) • 🔴 +91 BBundles that do not match a named category
Status: 35 added / 35 removed |
|
Closing - this fix targeted the wrong component. The actual bug is in Markdown widgets when clicking on compiled markdown to enter editing mode. |
Summary
Fixes a bug where attempting to select text inside Vue node InputText widgets causes the node to drag instead of text being selected.
Affected Versions: FE 1.35.9 (cloud and local), FE 1.37.3
Root Cause
WidgetInputText.vuelacked capture-phase pointer event modifiers. When users click/drag to select text:pointerdownevent fires on input elementLGraphNode.vuewhich initiates node drag viauseNodePointerInteractions.tssetPointerCapture()hijacks all pointer events away from the inputSolution
Add
@pointerdown.capture.stop,@pointermove.capture.stop, and@pointerup.capture.stopmodifiers to the InputText component, matching the existing pattern inWidgetTextarea.vue(lines 22-24).Blast Radius Analysis
NodeWidgets.handleBringToFrontstill fires (capture phase on parent fires before child)WidgetLegacy.vueandWidgetDOM.vueunaffected (already use.stop)WidgetTextarea.vuewhich has been in productionTesting
pnpm typecheckpassespnpm lintpasses┆Issue is synchronized with this Notion page by Unito