Skip to content

fix(toolbar): preserve selection inside modal dialogs - #4835

Open
minwookshin wants to merge 1 commit into
slab:mainfrom
minwookshin:fix/toolbar-selection-in-modal-dialog
Open

minwookshin wants to merge 1 commit into
slab:mainfrom
minwookshin:fix/toolbar-selection-in-modal-dialog

Conversation

@minwookshin

Copy link
Copy Markdown

Fixes #4796.

Prevent primary-button mousedown on an attached toolbar button from moving focus away from the editor. This preserves the selected range inside a native modal dialog, so a slow click can apply formatting and the next click can remove it. Keyboard activation and select controls retain their existing behavior.

Added browser regressions for modal and non-modal dialogs, slow pointer clicks, repeated formatting, and keyboard activation. The Chromium modal regression fails on the original code; all six new cases pass in Chromium, Firefox, and WebKit after the fix.

Validation: 93 E2E tests, 521 unit tests, package lint/type checks, and the production webpack bundle passed. The full package build is blocked by an existing WebpackError.prepareStackTrace declaration incompatibility (TS2417), reproduced on the unchanged base as well; no dependency or build configuration changes are included.

Assisted-by: Codex

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When a Quill editor is in a dialog opened with showModal(), toolbar buttons don't work correctly

1 participant