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: prevent crashes when choosing monaco snippets with mouse #877

Merged
merged 2 commits into from
Oct 23, 2018

Conversation

roperzh
Copy link
Member

@roperzh roperzh commented Oct 23, 2018

OK to merge.

Short review.

Summary of changes:

Fixes crash: Monaco bug: Error: Invalid start index: 2

There's an issue (now fixed) in vscode which causes the editor to crash when selecting autocompletion items with the mouse.

monaco is built from the vscode source as a separate package from time to time, but that fix is not released yet, so for the moment I'm disabling the ability to select autocompletion items with the mouse.

I created an issue in the monaco repo asking for a new release, but I don't expect that to occur any time soon.

Regressions to look for:

  • Autocompletion in Actions Editor.

Completed checkin tasks:

  • Did manual testing of interrelated functionality
  • Wrote an automated test for existing and modified functionality
  • Added measurement instrumentation (Mixpanel, etc.)
  • Updated changelog/public/latest.json

element.addEventListener('mousedown', (mouseDownEvent) => {
mouseDownEvent.preventDefault();
mouseDownEvent.stopImmediatePropagation();
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Reasonably confident these elements and their listeners go out of scope after the menu closes, so LGTM.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are 💯 right, I can confirm that they do.

@stristr stristr merged commit 0291d3b into master Oct 23, 2018
@zackbrown zackbrown deleted the fix-monaco-snippet-crash branch September 19, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants