How to prevent dragging local files into the browser?

makes a page, but when I drag a local file mouse into the page, the browser opens the file, and I want to stop this action, that is, the page does nothing when the file is dragged in.


related events

drag
dragend
dragenter
dragexit
dragleave
dragover
dragstart
drop

document.addEventListener("dragenter", function( event ) {
    ...
}, false);
document.addEventListener("dragover", function( event ) {
    ...
}, false);
document.addEventListener("drop", function( event ) {
    event.preventDefault();//
    ...
    return false;//
}, false);
document.addEventListener("dragend", function( event ) {
    ...
}, false);
Menu