-
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
Chrome: Unselect blocks when opening the document settings #6936
Conversation
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.
Nice! Works as intended.
I can't review the code, but the experience feels right 👍 👍
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.
👍
const { openGeneralSidebar } = dispatch( 'core/edit-post' ); | ||
const { clearSelectedBlock } = dispatch( 'core/editor' ); | ||
return { | ||
openDocumentSettings: () => { |
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.
You can use object function shorthand:
return {
openDocumentSettings() { ... },
openBlockSettings() { ... },
};
ca1cc48
to
58f0a68
Compare
@youknowriad quick question: would it be easy to re-select the previously selected block when clicking "Block" after "Document" has been clicked? |
@afercia We'd have to store this information somewhere, we don't have it at the moment. |
closes #6887
Testing instructions