After a click on the page, there is a pop-up box, the top text box can not get the focus, and the text box of the original page can not get the focus, how to solve it?

this is written by jquery, the key jquery code:
/ to achieve drag special effects /

var div1 =document.getElementById("faqdiv");
var disX = 0;
var disY = 0;
$(div1).css("margin","0");   //div
document.onmousedown = function (ev) {  //
    var oEvent = ev || event;       //
    disX = oEvent.clientX - div1.offsetLeft;    //divoffsetLeft
    disY = oEvent.clientY - div1.offsetTop;     //divoffsetTop
    document.onmousemove = function (ev) {      //
        var oEvent = ev || event;
        var left = oEvent.clientX - disX;          //div
        var top = oEvent.clientY - disY;          //div
        if (left < 0) {        //divDIV
            left = 0;
        }else if (left > document.documentElement.clientWidth - div1.offsetWidth) {
            left = document.documentElement.clientWidth - div1.offsetWidth;
        }
        if (top < 0) {
            top = 0;
        }else if (top > document.documentElement.clientHeight - div1.offsetHeight) {
            top = document.documentElement.clientHeight - div1.offsetHeight;
        }
        div1.style.left = left + "px";      //DIV
        div1.style.top = top + "px";       //DIV
    }
    document.onmouseup = function () {      //
        document.onmousemove = null;
        document.onmouseup = null;
    }
    return false;
}
Mar.12,2021
Menu