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

Remove dependency on window.event in ListView #20966

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

rf-
Copy link
Contributor

@rf- rf- commented Feb 21, 2017

Fixes microsoft/monaco-editor#371.

The event property of Window is nonstandard and isn't supported by Firefox,
breaking some of ListView's event-handling behavior.

I checked for places where VSCode depends on window.event by removing it from
lib.d.ts and building from scratch; the references in ListView were the only
ones I found in src/vs/base/browser. There are also some references in
non-browser parts of the codebase, but I assume that's fine since they work in
Electron.

Fixes microsoft/monaco-editor#371.

The `event` property of Window is [nonstandard] and isn't supported by Firefox,
breaking some of ListView's event-handling behavior.

I checked for places where VSCode depends on `window.event` by removing it from
`lib.d.ts` and building from scratch; the references in ListView were the only
ones I found in `src/vs/base/browser`. There are also some references in
non-browser parts of the codebase, but I assume that's fine since they work in
Electron.

[nonstandard]: https://developer.mozilla.org/en-US/docs/Web/API/Window/event
@mention-bot
Copy link

@rf-, thanks for your PR! By analyzing the history of the files in this pull request, we identified @joaomoreno and @alexandrudima to be potential reviewers.

@msftclas
Copy link

Hi @rf-, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@rf-
Copy link
Contributor Author

rf- commented Feb 21, 2017

For completeness, here's the list of references that aren't covered by this PR:

src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts(316,40)
src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts(335,43)
src/vs/workbench/parts/search/browser/searchViewlet.ts(480,53)

@joaomoreno joaomoreno self-assigned this Feb 21, 2017
@joaomoreno joaomoreno added this to the Backlog milestone Feb 21, 2017
@joaomoreno joaomoreno merged commit 37cd928 into microsoft:master Feb 21, 2017
@joaomoreno
Copy link
Member

Wow, great catches, these are definitely oversights.

@joaomoreno joaomoreno modified the milestones: February 2017, Backlog Feb 21, 2017
@rf- rf- deleted the fix-monaco-editor-371 branch February 21, 2017 16:42
@rf-
Copy link
Contributor Author

rf- commented Feb 21, 2017

Thanks for the quick response!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
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.

ReferenceError: event is not defined in Firefox
4 participants