Skip to content
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

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

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

oxcened
Copy link
Contributor

@oxcened oxcened commented Nov 13, 2023

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
Contributor

Hi @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-mar self-requested a review November 13, 2023 12:00
@aiday-mar
Copy link
Contributor

aiday-mar commented Nov 13, 2023

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

@karo-yousefi
Copy link

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