Fix insertion point showing up unexpectedly#44702
Merged
youknowriad merged 3 commits intotrunkfrom Oct 5, 2022
Merged
Conversation
|
Size Change: +113 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
jasmussen
approved these changes
Oct 5, 2022
Contributor
jasmussen
left a comment
There was a problem hiding this comment.
Huge improvement! In trunk, I can move the cursor to where the sibling inserter will be, then move it outside of the canvas, and it appears after a while regardless:
In this branch, if I move the cursor outside of the canvas, it doesn't appear:
This is the desired behavior, green check for that! I'll defer to others on a code review. Thanks Riad!
Member
|
I'm still seeing an errant inserter under some conditions: sibling-what-is-going-on.mov |
Contributor
Author
|
Unfortunately, I was not able to fix all the issues here while keeping the performance tweaks made in #44325. So I now reverted some of these optimizations. |
dce5432 to
5013124
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Closes #44694
What?
Recently, I did a performance optimization to avoid calling too much actions when moving the mouse or scrolling. That introduced a race condition that was causing the insertion point to show up unexpectedly in some situations. Basically a delayed showInsertionPoint function call was not being "canceled" properly as we left the insertion point position. This PR fixes it by making sure that all calls to hideInsertionPoint cancel any scheduled call to showInsertionPoint.
Testing Instructions
1- Open the site editor
2- Hover the area right after the header template part
3- Move the mouse on the template part
4- The insertion point should not appear again.