-
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
Site Editor: Always use auto-cursor style for editable text #64627
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +41 B (0%) Total Size: 1.77 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.
Wonderful PR. Appreciate the before/after demos, the clear explanation, and the small diff.
@jasmussen Thanks for the review! |
Co-authored-by: t-hamano <[email protected]> Co-authored-by: jasmussen <[email protected]>
Fixes #53374
What?
This PR applies the auto-cursor style whenever the text is editable, i.e., when it's the RichText component.
This makes it possible to tell by the cursor whether the text is editable or not.
Why?
As of #40785, blocks that are non-editable text will now use the default cursor.
However, the block itself is not necessarily a
RichText
component, it may have aRichText
component in it, or it may have an editable block inside it.How?
In addition to applying auto-cursor style when the block itself is editable, this PR also applies auto-cursor to any
RichText
components contained within.Additionally, this PR applies the appropriate cursor style when the block is not selected and is hovered over.
Testing Instructions
Screenshots or screencast
Before
before.mp4
After
after.mp4