-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi block selection: more responsive UI #18915
Conversation
afd723f
to
1bede6e
Compare
@@ -68,7 +68,7 @@ class BlockList extends Component { | |||
|
|||
this.onSelectionStart = this.onSelectionStart.bind( this ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love if we can somehow isolate/decouple the multi-selection code form the BlockList rendering code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I feel like the PR converting to hooks is a good opportunity to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't check the code deeply, but this feels so great.
Thanks! |
@mcsf I can't reproduce. Which browser is this? |
Ah, I do seem to run into issues with Firefox... |
It works fine in Chrome and Safari. In Firefox, the whole paragraph gets selected after leaving the initial block, which indicates that Firefox is resetting the selection when content editable is switched off. Thinking what to do... 🤔 |
After testing the previous commit (bd8436f), it looks like Firefox didn't have any problems previously though. |
Description
Alternative to #18836.
This PR makes the multi selection UI feel more responsive by instantly changing it when the selection changes.
How has this been tested?
Screenshots
Types of changes
Enhancement
Checklist: