-
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
Inserter: sibling insertion point at top of selected block covers up part of block content #8881
Comments
So this to me seems like a bug, not an intentional choice. It could be fixed by setting
This basically moves the inserter's container div to be positioned between the two blocks, rather than moving the inserter button itself. In a quick test, it seems to work without any changes in behavior, other than making the top line of a paragraph block's text accessible, which is the goal. Tagging in @jasmussen for feedback on that, because I might be missing a very obvious reason the inner div is moved up rather than the insertion-point container :) |
@chrisvanpatten Nice! Notably, even with this fix, the sibling inserter itself (as in the clickable button) would still overlap a portion of the bottom of the block no matter what. I reported that in #8883, but that issue was closed as a duplicate of this one. |
Taking a look. Also CC: @aduth as we chatted yesterday about it being hard to set cursor in text, this is possibly why. |
Thanks both, good ticket, and thanks for the proposed fix, @chrisvanpatten, though alas this just moves the issue to the bottom of the paragraph instead of the top. But I will investigate and see if I can find a fix. |
This fixes #8881. The sibling inserter hit area was not centered perfectly between two blocks. This PR fixes that. Props to @chrisvanpatten for this fix.
Actually Chris, you were right and I was wrong. Your fix, plus or minus a few tweaks, I have implemented in #9229 which fixes this. Props! |
This fixes #8881. The sibling inserter hit area was not centered perfectly between two blocks. This PR fixes that. Props to @chrisvanpatten for this fix.
The issue
The markup for the sibling inserter at the top of a block can cover up part of the block content, even when the block is selected and that sibling inserter is not visible.
Pictured here is a Paragraph block with font size set to 8px; the text is almost completely unselectable due to the div that is covering up most of the block content:
This issue becomes even more apparent for blocks with custom top/bottom margins or when themes style the core blocks to have smaller vertical margins. Removing the margins that are currently applied by default to all blocks would also expose this issue more; see #8350.
On a related note, I think sibling inserters should come after the content of a block both semantically and visually. You usually want to use a sibling inserter after the current block, not before.
Steps to reproduce
Related issues and PRs
The text was updated successfully, but these errors were encountered: