-
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
In-between inserter: allow scrolling over indicator #63270
base: trunk
Are you sure you want to change the base?
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: -75 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
|
||
return () => { | ||
node.removeEventListener( 'mousemove', onMouseMove ); | ||
node.removeEventListener( 'click', onMouseMove ); |
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.
This onClick handler was previously in the popover, but we can handled it here since it's now click-through.
@@ -30,18 +30,10 @@ | |||
// drop zone. | |||
pointer-events: none; | |||
|
|||
* { | |||
pointer-events: none; |
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.
pointer-events
is inherited.
nextClientId && | ||
getBlockEditingMode( nextClientId ) !== 'disabled' | ||
) { | ||
selectBlock( nextClientId, -1 ); |
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.
As noted above, this has moved to the canvas instead.
// Only hide the inserter if it's triggered on the wrapper, | ||
// and the inserter is not open. | ||
if ( event.target === ref.current && ! openRef.current ) { | ||
hideInsertionPoint(); |
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.
These things seem to be workarounds to the fact that the indicator caught clicks (and didn't trigger the mousemove
event listener in the canvas, so it had to be duplicated here.
It's getting a bit too complex to consider for 6.6. |
Is it possible to reduce it down to just the CSS changes for 6.6 or are all the JS changes required too? I tested and it works, but I'd like a bit more time to understand the JS changes. |
@talldan No, not possible unfortunately because by setting pointer events to none, those event handlers will basically never be called. |
@ellatrix It'd be good to revisit this one and finally get it fixed. If you want to rebase the PR I'd be happy to give it a test and 👍 if everything's still working. |
What?
Fixes #63260.
Why?
Because it's super annoying. :)
How?
Looks like pointer-events: all was re-applied to early on the entire indicator instead of just on the button.
Testing Instructions
Hover over the space in between blocks and scroll.
Make sure that #45420 does not regress.
Testing Instructions for Keyboard
Screenshots or screencast