"drop" event is not always triggered when dropping a file |
|||
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:
,
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.
,
Mar 15 2017
,
Mar 15 2017
False alarm. dragover event was causing the file load.
,
Mar 15 2017
Please close the bug at your convenience.
,
Mar 15 2017
Thank you for the update. |
|||
►
Sign in to add a comment |
|||
Comment 1 by btelles@google.com
, Mar 15 2017