-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix selecting aligned blocks #31904
Fix selecting aligned blocks #31904
Conversation
Size Change: -12 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
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.
Tested and fixes the issue. Thanks!
Should we update the comment that refers to block appender though? Is it still valid?
Yes, good point. I'll need to check why this was changed in the first place. |
546d7e3
to
d09b75d
Compare
d09b75d
to
0db868d
Compare
@@ -138,6 +138,8 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) { | |||
'data-type': name, | |||
'data-title': blockTitle, | |||
className: classnames( | |||
// The wp-block className is important for editor styles. | |||
'wp-block block-editor-block-list__block', |
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.
wp-block shouldn't be added to blocks with the align wrapper, this broken full/wide alignments.
Description
Regression from #30995.
Solution: the
wp-block
class name should be applied to all block wrappers, even if there's alignment. An alignment wrapper is a bit like a pseudo-group blocks. It doesn't mean we need to remove thewp-block
class from the aligned block.How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).