-
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
Add remove block keyboard shortcut #8805
Conversation
1ae1625
to
e608ed3
Compare
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.
The code looks good! 👍
It would be nice if, after deleting a block, your cursor was positioned at the end of the previous block instead of at the start. Not a blocker though.
// User is using the Remove Block shortcut, so allow the event to bubble | ||
if ( altKey && metaKey && isReverse ) { | ||
return; | ||
} |
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 fear that, if we later change the shortcut, this code will be left here for the eternity of time... not sure how to fix that, though. Maybe let's explicitly mention the shortcut and component in the comment?
// User is using the Remove Block shortcut (Alt+Meta+Backspace), so allow the event to bubble up to <BlockSettingsMenu>
e608ed3
to
4b3c3e6
Compare
4b3c3e6
to
178325e
Compare
Description
Related #2980, #8279
onDeleteKeyDown
functionHow has this been tested?
Screenshots
Block Settings Menu:
Shortcuts Help Modal
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: