Skip to content

Fixes Web Firefox: dropping a file onto itself navigates the page - #83962

Merged
Benjamin Pasero (bpasero) merged 1 commit into
microsoft:masterfrom
jeanp413:fix-83287
Nov 5, 2019
Merged

Fixes Web Firefox: dropping a file onto itself navigates the page#83962
Benjamin Pasero (bpasero) merged 1 commit into
microsoft:masterfrom
jeanp413:fix-83287

Conversation

@jeanp413

Copy link
Copy Markdown
Contributor

This PR fixes #83287

@bpasero Benjamin Pasero (bpasero) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Jean Pierre (@jeanp413) thanks, I think this is the right direction, but now thinking more about it, wouldn't the best fix be to prevent default on the workbench container where this event eventually bubbles up? As such I suggest this fix in:

private registerListeners(workbench: Workbench, storageService: BrowserStorageService): void {

// Prevent default navigation on drop
this._register(addDisposableListener(this.domElement, EventType.DROP, (e) => EventHelper.stop(e, true)));

@jeanp413

Copy link
Copy Markdown
Contributor Author

Much better. Thanks

@bpasero
Benjamin Pasero (bpasero) merged commit 5d3c599 into microsoft:master Nov 5, 2019
@bpasero

Copy link
Copy Markdown
Contributor

Thanks!

@jeanp413
Jean Pierre (jeanp413) deleted the fix-83287 branch November 5, 2019 16:40
@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.

Web Firefox: dropping a file onto itself navigates the page

3 participants