-
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
Writing Flow Multi-select: ensure post title content editable after multi-select #36843
Writing Flow Multi-select: ensure post title content editable after multi-select #36843
Conversation
…ulti-select. Adding tests.
Size Change: +516 B (0%) Total Size: 1.1 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.
Thanks for the tests! This seems simple enough in terms of it being a CSS selector to exclude. All worked well for me and nice catch.
Array.from( | ||
container.querySelectorAll( | ||
// Exclude the Post Title from multi-select disable. | ||
'.rich-text:not( .editor-post-title__input )' |
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.
@ellatrix could we solve this issue without adding the selector from editor
package to block-editor
? Any thoughts?
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.
Yes. :) We should make the post title a block and lots of issues will be resolved. ;)
Description
Can you, after multi-selecting blocks in the post editor, edit your formerly-editable post title?
I can't. I've tried block and non-block themes, including TwentyNineteen, TwentyTwentyTwo and TT1.
This PR tries to fix that by excluding the post title rich text element from the collection of elements whose content may not be edited during a multi-select.
This is my first look into this area, so I'd welcome advice as to whether there's a better way.
Testing
Create a new post. Give it a title, e.g.,
' Let Your Love Flow, by the Bellamy Brothers'
Now include a few blocks, maybe a couple of paragraphs. Write what you will. My topic was "miscreants".
Select two or more blocks by dragging your mouse over them. Also try using the keyboard via SHIFT + Arrow keys. You'll know they're selected if they all have a blue border.
Now click elsewhere on the document.
You should still be able to update your site title, where you could not before.
Run
npm run test-unit packages/block-editor/src/components/writing-flow/test/use-multi-selection.js
and leave some room in your life for old style country music.Checklist:
*.native.js
files for terms that need renaming or removal).