fix: do not hide hover on model content change of editor - #198066
Closed
Alen Ajam (oxcened) wants to merge 1 commit into
Closed
fix: do not hide hover on model content change of editor#198066Alen Ajam (oxcened) wants to merge 1 commit into
Alen Ajam (oxcened) wants to merge 1 commit into
Conversation
Aiday Marlen Kyzy (aiday-mar)
self-requested a review
November 13, 2023 09:09
Alen Ajam (oxcened)
force-pushed
the
fix-color-picker-hover
branch
from
November 13, 2023 11:37
79ed94f to
3712c89
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #197588.
What I did
So the issue arised in 18.4.0 with #196709, in particular this line.
The reason of the issue is because whenever a color is picked through any of the selectors, a change is immediately triggered on the editor. That triggers the editor's
onDidChangeModelContentemitter, therefore the hover widget triggers the_hideWidgetsmethod.So it's actually a very easy flow to understand: color picker changes editor content -> editor triggers emitter -> hover widget hides itself.
I have changed the method called on model content change so that we just cancel the scheduler and we don't hide the widget as well.
I just need some help with debugging the previous issue #196660 in order to make sure that this is not introducing regressions on that one.