-
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
Group: fix padding select #65857
Group: fix padding select #65857
Conversation
|
||
> * { | ||
user-select: all; | ||
} |
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.
What happens if a group is within a group, which rule should apply? I assume the "none" but It seems this won't work for it.
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.
Oh yes, I guess .group > *
is stronger than .group
.
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.
Also I guess it would be good to have a general solution, not just for groups, but it feels a bit dangerous to disable selection for all non editable content.
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.
yea, maybe we can start with groups. The other thing is should this be user-select: all;
or user-select: reset;
or something (we don't know what's inside the group, so would be good to have a way to reset to browser default.
Size Change: +274 B (+0.02%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
In the last commit I used "initial" instead of "all" to basically reset the default value. I felt it's a bit safer but let me know what you think. |
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. |
This is way better. Thank you Ella. I think we can consider merging as is. That said, I think it's still not solved entirely for nested groups. Use the following pattern:
It's a stack within a group. |
5b23e05
to
8d9c00c
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.
Ok, this fixes the issues for me in Chrome. I think Safari is still not working consistently though but we can look at that separately.
Ella, what's blocking this one? |
Nothing, only needed a review and merge :) |
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
What?
Fixes clicking on group padding for flex layout.
The cause: https://codepen.io/iseulde/pen/OJKNWOz
Why?
Clicking on the padding of a group with flex layout causes selection to be captured by a nested rich text block.
How?
Use
user-select: none
to prevent selection on group blocks.Testing Instructions
Example from below:
Testing Instructions for Keyboard
Screenshots or screencast