fix: do not hide hover on model content change of editor - #198100
Merged
Martin Aeschlimann (aeschli) merged 2 commits intoNov 13, 2023
Conversation
Alen Ajam (oxcened)
force-pushed
the
fix-color-picker-hover
branch
from
November 13, 2023 11:56
a02d70d to
2722565
Compare
Contributor
|
Hi Alen Ajam (@oxcened) thank you for the work and good catch. Indeed I see how the previous PR introduced a regression. I will review the PR. |
Aiday Marlen Kyzy (aiday-mar)
self-requested a review
November 13, 2023 12:00
Contributor
|
This is a good fix, it fixes all the recent errors happening with the color picker. Martin Aeschlimann (@aeschli) can you review it? |
Aiday Marlen Kyzy (aiday-mar)
approved these changes
Nov 13, 2023
Aiday Marlen Kyzy (aiday-mar)
requested a review
from Martin Aeschlimann (aeschli)
November 13, 2023 14:00
Martin Aeschlimann (aeschli)
approved these changes
Nov 13, 2023
Martin Aeschlimann (aeschli)
enabled auto-merge (squash)
November 13, 2023 16:31
This was referenced Nov 14, 2023
Closed
Closed
Closed
|
Thanks for the fix. |
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 onDidChangeModelContent emitter, therefore the hover widget triggers the _hideWidgets method.
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.
(ref #198066)