Skip to content

fix: do not hide hover on model content change of editor - #198100

Merged
Martin Aeschlimann (aeschli) merged 2 commits into
microsoft:mainfrom
oxcened:fix-color-picker-hover
Nov 13, 2023
Merged

fix: do not hide hover on model content change of editor#198100
Martin Aeschlimann (aeschli) merged 2 commits into
microsoft:mainfrom
oxcened:fix-color-picker-hover

Conversation

@oxcened

Copy link
Copy Markdown
Contributor

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)

@aiday-mar

Copy link
Copy Markdown
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-mar

Aiday Marlen Kyzy (aiday-mar) commented Nov 13, 2023

Copy link
Copy Markdown
Contributor

This is a good fix, it fixes all the recent errors happening with the color picker. Martin Aeschlimann (@aeschli) can you review it?

@karo-yousefi

Copy link
Copy Markdown

Thanks for the fix.

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color Picker closes prematurely after clicking anywhere in the picker.

5 participants