Skip to content

Fix race condition in showing and hiding suggestWidget #121396

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

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

limitedmage
Copy link
Contributor

@limitedmage limitedmage commented Apr 15, 2021

This PR fixes microsoft/monaco-editor#2437

If suggestions are triggered by typing, typing causes the suggest widget be shown and then hidden as the typing initially matches some suggestions but then no suggestions. However, a race condition might happen because there is a 100ms timeout for showing the widget, but hiding is immediate. This change fixes the issue by cancelling the show timeout when hiding the widget.

@limitedmage
Copy link
Contributor Author

limitedmage commented Apr 16, 2021

@jrieken I made the suggested change and now integration tests are failing in CI (they are passing locally for me). Any idea what may be happening? I synced my branch to latest main. Update: looks like CI was broken for a bit, synced with main again and it's passing now :)

Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jrieken jrieken added this to the April 2021 milestone Apr 19, 2021
@jrieken jrieken merged commit cc778d6 into microsoft:main Apr 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2021
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.

Race condition in showing and hiding the suggestions widget
2 participants