New issue
Advanced search Search tips

Issue 701959 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

"drop" event is not always triggered when dropping a file

Project Member Reported by btelles@google.com, Mar 15 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36

Steps to reproduce the problem:
1. Open developer tools console and paste the following snippet:

window.ondrop = function (e) {
  console.log(e);
  debugger;
  e.preventDefault();
  e.stopPropagation();
}

or alternatively:

window.addEventListener('drop', function (e) {
  console.log(e);
  debugger;
  e.preventDefault();
  e.stopPropagation();
});

2. Drag and drop a file from a file manager (e.g. Nautilus on Linux)

What is the expected behavior?
I expect the console to show the event (Drag*) and to stop at the debugger. After stopping at the debugger, I expect the page to stay the same and not open the file within the browser (if it's an image) or "download" it if it's a non-openable file.

What went wrong?
The console does not log the event, the debugger does not get triggered, and the browser attempts to open the file.

Did this work before? N/A 

Chrome version: 57.0.2987.98  Channel: stable
OS Version: 
Flash Version:
 

Comment 1 by btelles@google.com, Mar 15 2017

Doubt the linux version matters much, but here goes:
 3.13.0-108-generic #155-Ubuntu SMP Wed Jan 11 16:58:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Comment 2 by btelles@google.com, Mar 15 2017

P.P.S. The drop event does get triggered sometimes, but I can't for the life of me figure out why it works sometimes and sometimes it doesn't.
Labels: Needs-Triage-M57

Comment 4 by btelles@google.com, Mar 15 2017

False alarm. dragover event was causing the file load.

Comment 5 by btelles@google.com, Mar 15 2017

Please close the bug at your convenience.
Status: WontFix (was: Unconfirmed)
Thank you for the update.

Sign in to add a comment