Skip to content

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

Merged
bpasero merged 1 commit intomicrosoft:masterfrom
jeanp413:fix-83287
Nov 5, 2019
Merged

Fixes Web Firefox: dropping a file onto itself navigates the page#83962
bpasero merged 1 commit intomicrosoft:masterfrom
jeanp413:fix-83287

Conversation

@jeanp413
Copy link
Contributor

@jeanp413 jeanp413 commented Nov 5, 2019

This PR fixes #83287

@bpasero bpasero added this to the November 2019 milestone Nov 5, 2019
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

@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
Contributor Author

jeanp413 commented Nov 5, 2019

Much better. Thanks

@bpasero bpasero merged commit 5d3c599 into microsoft:master Nov 5, 2019
@bpasero
Copy link
Member

bpasero commented Nov 5, 2019

Thanks!

@jeanp413 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