-
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
Post/site/template editors: clear selection on iframe html element click, fix bottom click redirect #31385
Conversation
Size Change: +18 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Thank you for working on this. The effect on the post editor is subtle but amazing: Clicking left or right of a block deselects, even if you click in the padding of the body element. It's not working quite as intended in the site editor, alas. I think it's the code that looks for the bottom block, which comes very early on archive pages in the site editor, meaning if you scroll just a little bit, you basically can't deselect: I understand the problem is related to the "click redirect" — the feature where if you click below the last block it sets focus on the last block. If we can keep that in the post editor, I still think that would be ideal. But if we have to remove that, it might still be worth it. Ultimately I thin it's more important to be able to deselect blocks than it is to easily select the last one. |
9859458
to
96b1314
Compare
@jasmussen No, this particular problem in the site editor is not related to the click redirect, it is not added there at all. The problem is that the selection clearer is active on the body element, but not the html element, and the body doesn't extend all the way to the bottom. I've fixed the problem now by also adding it to the html element. |
96b1314
to
fec3f0a
Compare
fec3f0a
to
da4c454
Compare
|
||
> * { | ||
cursor: auto; | ||
} |
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.
We need to remove the cursor style as we can't apply it to only the bottom padding of an element.
It works great, so let's merge. There's a small issue with FSE that exists in trunk too where you have to click twice above the first block to clear selection, but I'll have to look into that separately. |
Description
Fixes #31369. Also fixes the selection clearer below the fold for FSE. It need to be active on the
html
element as well, so I built it in the Iframe component.How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).