Repository navigation
Safari: fix Shift+Click multi select - #53440
Merged
Merged
Conversation
|
Size Change: +25 B (0%) Total Size: 1.5 MB
ℹ️ View Unchanged
|
ellatrix
commented
Aug 9, 2023
| if ( shouldHandleWholeBlocks && ! expandSelectionIsNeeded ) { | ||
| removeBlocks( selectedBlockClientIds ); | ||
| } else { | ||
| event.target.ownerDocument.activeElement.contentEditable = false; |
Member
Author
There was a problem hiding this comment.
This is actually a bug introduced in #40098. When using __unstableDeleteSelection, contenteditable needs to be turned off first (see other instances). Ideally we should move this logic to writing flow and build in clipboard handling there.
richtabor
self-requested a review
August 10, 2023 02:00
richtabor
approved these changes
Aug 10, 2023
richtabor
left a comment
Member
There was a problem hiding this comment.
Works!
Before (unable to multi-select):
CleanShot.2023-08-09.at.21.58.11.mp4
After (able to multi-select):
CleanShot.2023-08-09.at.21.59.19.mp4
ellatrix
force-pushed
the
try/rich-text-remove-tabindex
branch
from
August 10, 2023 06:00
798134a to
2115ab4
Compare
Member
Author
|
Added the existing e2e test to be run on WebKit. |
ellatrix
enabled auto-merge (squash)
August 10, 2023 06:01
tellthemachines
pushed a commit
that referenced
this pull request
Aug 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes #44755.
Safari doesn't allow Shift+Click selection inside content editable into an element with a tab index. Instead it focusses that element. Except for removing the tab index, there's no way to otherwise prevent a focusable element from gaining focus as far as I know. Normally, contentEditable should be disabling all interactivity.
Why?
How?
Thought a while about it, and then realised we don't actually need the tab index is the element is content editable, because these elements are already focusable.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast