Dragging and dropping events in Firefox can prevent a from opening a new window, but dragging in instead of dragging out will open a new window.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
    -sharpbox{
        width: 500px; height: 500px; border: 1px solid black;
    }
</style>
<script>
window.onload = function (){
    var box = document.getElementById("box");

    box.addEventListener("dragenter",function (){
        console.log("");
    },false);

    box.addEventListener("dragover",function (e){
        e.preventDefault();
        e.stopPropagation();;
        console.log("");
    },false);

    box.addEventListener("dragleave",function (e){
        e.preventDefault();
        e.stopPropagation();
        console.log("");
    },false);

    box.addEventListener("drop",function (e){
        e.preventDefault();
        e.stopPropagation();
        console.log("");
    },false);

    a.addEventListener("click",function (e){
        e.preventDefault();
    },false)
};
</script>
</head>
<body>
    <a href="http://www.baidu.com" id="a"></a>
    <div id="box">
        
    </div>
</body>
</html>
Mar.03,2021

I have solved this problem, blocking the default behavior and canceling bubbling in the dragend event of the dragged element will solve this problem

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38943-2c11a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38943-2c11a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?