-
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
Try delaying sibling inserter hover events #17240
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
672f99d
Try delaying block mover hover events.
kjellr 7ee67d7
Properly center sibling inserter on the block borders.
kjellr db9d48a
Merge branch 'master' into try/block-mover-appear-on-delay
kjellr ad24f89
Use transition instead of animation for the inserter fade.
kjellr 69e88a8
Merge branch 'master' into try/block-mover-appear-on-delay
kjellr 0109b7c
Vertically center the inserter plus.
kjellr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this is ok, but is there a specific reason you’ve used animation rather than transition and transition-delay? Seems like you could accomplish the same thing with less code using transition.
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.
🤔 Hmm. Yeah — my first inclination was to use that mixin we have, but I bet this would work too (and maybe fix whatever weird bug is preventing the clicks from registering in Safari?). I'll give it a try.
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.
Does the "reduce motion" thing suggest either approach?
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.
Actually — trying this out now: the main issue is that we only want to apply that delay when this animates in. We still want it to fade out as soon as you mouse out.
Transition will apply to both in and out, which means the button will stick around for an extra second after the cursor leaves 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.
You can apply different transition-delay to the base selector and the hover. That should do the trick.
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.
Scratch that — I got this working in db9d48a (after a quick DM with @shaunandrews. 😄).
The only caveat is that the
pointer-events
animation didn't work when I tried to move it to a transition instead. I kept that as an animation for now, but it still only works in Chrome and Firefox. I'd guess thatpointer-events
isn't generally the sort of property that's supposed to be animated, so its behavior isn't quite the same in each browser. 😕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.
Exactly. Animating
pointer-events
is a hack, and not a reliable solution. This is a tough one to solve with CSS alone. I'd imagine some JS will be required to handle the delay and trigger the state change.You might be able to rethink the way you're doing the transition to use a parent element to trigger the delay, which might fix the issue with
pointer-events
— but JS might be more succinct.