fix: restore mouse-wheel scrolling in preview-as-text outputs#8863
fix: restore mouse-wheel scrolling in preview-as-text outputs#8863christian-byrne merged 1 commit intomainfrom
Conversation
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 02/20/2026, 05:30:34 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
|
Playwright: ✅ 524 passed, 0 failed · 1 flaky 📊 Browser Reports
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThree widget components are modified to enhance accessibility and interaction: preview widgets are no longer explicitly disabled, markdown rendering gains keyboard focus and wheel-event capture, and textarea read-only state is no longer bound to the disabled attribute. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
📦 Bundle: 4.26 MB gzip 🟢 -126 BDetailsSummary
Category Glance App Entry Points — 21.4 kB (baseline 21.4 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 914 kB (baseline 914 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 68.6 kB (baseline 68.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 430 kB (baseline 430 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 16 kB (baseline 16 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed Editors & Dialogs — 706 B (baseline 706 B) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 1 added / 1 removed UI Components — 42.3 kB (baseline 42.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.4 MB (baseline 2.4 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed Utilities & Hooks — 57.6 kB (baseline 57.6 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 12 added / 12 removed Vendor & Third-Party — 8.69 MB (baseline 8.69 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.38 MB (baseline 7.38 MB) • 🟢 -92 BBundles that do not match a named category
Status: 49 added / 49 removed |
Remove `disabled` attribute from read-only preview textareas — disabled elements cannot receive focus, so the focus-gated wheel capture logic (#6597) always forwards wheel events to the canvas instead of allowing scroll. Add `data-capture-wheel` and `tabindex` to WidgetMarkdown display div so rendered markdown content can also capture wheel events when focused. Fixes COM-14812 Amp-Thread-ID: https://ampcode.com/threads/T-019c5a22-0e4c-7217-b022-49f9c86b8790
ffbba1a to
893f086
Compare
| :class="cn(WidgetInputBaseClass, 'size-full text-xs resize-none')" | ||
| :placeholder | ||
| :readonly="isReadOnly" | ||
| :disabled="isReadOnly" |
There was a problem hiding this comment.
I think this was for display purposes
## Summary Restore mouse-wheel scrolling for read-only preview widgets (PreviewAny plaintext and markdown modes), broken by the focus-gated wheel capture in #6597. ## Changes - **What**: Remove `disabled` attribute from read-only textareas (keep `readonly`) so they can receive focus and capture wheel events. Add `data-capture-wheel` and `tabindex` to WidgetMarkdown display div. - **Root cause**: `disabled` elements cannot receive focus in browsers. The focus-gated `wheelCapturedByFocusedElement()` from #6597 always evaluated to false for disabled textareas, forwarding all wheel events to the canvas. ## Review Focus - Verify that removing `disabled` while keeping `readonly` does not allow unintended editing - Confirm `tabindex="0"` on the markdown display div does not cause unexpected tab-order issues - Ensure trackpad panning over unfocused widgets (#6523) still works correctly Fixes COM-14812 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8863-fix-restore-mouse-wheel-scrolling-in-preview-as-text-outputs-3076d73d365081719bf5e453235bb2b5) by [Unito](https://www.unito.io)
## Summary Restore mouse-wheel scrolling for read-only preview widgets (PreviewAny plaintext and markdown modes), broken by the focus-gated wheel capture in #6597. ## Changes - **What**: Remove `disabled` attribute from read-only textareas (keep `readonly`) so they can receive focus and capture wheel events. Add `data-capture-wheel` and `tabindex` to WidgetMarkdown display div. - **Root cause**: `disabled` elements cannot receive focus in browsers. The focus-gated `wheelCapturedByFocusedElement()` from #6597 always evaluated to false for disabled textareas, forwarding all wheel events to the canvas. ## Review Focus - Verify that removing `disabled` while keeping `readonly` does not allow unintended editing - Confirm `tabindex="0"` on the markdown display div does not cause unexpected tab-order issues - Ensure trackpad panning over unfocused widgets (#6523) still works correctly Fixes COM-14812 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8863-fix-restore-mouse-wheel-scrolling-in-preview-as-text-outputs-3076d73d365081719bf5e453235bb2b5) by [Unito](https://www.unito.io)
|
@christian-byrne Successfully backported to #9006 |
|
@christian-byrne Successfully backported to #9007 |
…-text outputs (#9006) Backport of #8863 to `core/1.39` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9006-backport-core-1-39-fix-restore-mouse-wheel-scrolling-in-preview-as-text-outputs-30d6d73d365081bf9398c56dece63fe9) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…s-text outputs (#9007) Backport of #8863 to `cloud/1.39` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9007-backport-cloud-1-39-fix-restore-mouse-wheel-scrolling-in-preview-as-text-outputs-30d6d73d365081c58024cd56484ba839) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
## Summary Restore mouse-wheel scrolling for read-only preview widgets (PreviewAny plaintext and markdown modes), broken by the focus-gated wheel capture in #6597. ## Changes - **What**: Remove `disabled` attribute from read-only textareas (keep `readonly`) so they can receive focus and capture wheel events. Add `data-capture-wheel` and `tabindex` to WidgetMarkdown display div. - **Root cause**: `disabled` elements cannot receive focus in browsers. The focus-gated `wheelCapturedByFocusedElement()` from #6597 always evaluated to false for disabled textareas, forwarding all wheel events to the canvas. ## Review Focus - Verify that removing `disabled` while keeping `readonly` does not allow unintended editing - Confirm `tabindex="0"` on the markdown display div does not cause unexpected tab-order issues - Ensure trackpad panning over unfocused widgets (#6523) still works correctly Fixes COM-14812 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8863-fix-restore-mouse-wheel-scrolling-in-preview-as-text-outputs-3076d73d365081719bf5e453235bb2b5) by [Unito](https://www.unito.io)
Summary
Restore mouse-wheel scrolling for read-only preview widgets (PreviewAny plaintext and markdown modes), broken by the focus-gated wheel capture in #6597.
Changes
disabledattribute from read-only textareas (keepreadonly) so they can receive focus and capture wheel events. Adddata-capture-wheelandtabindexto WidgetMarkdown display div.disabledelements cannot receive focus in browsers. The focus-gatedwheelCapturedByFocusedElement()from Forward scroll unless focused #6597 always evaluated to false for disabled textareas, forwarding all wheel events to the canvas.Review Focus
disabledwhile keepingreadonlydoes not allow unintended editingtabindex="0"on the markdown display div does not cause unexpected tab-order issuesFixes COM-14812
┆Issue is synchronized with this Notion page by Unito