Why does he still see the "open prompt" window every time he presses submit? Has it been written anywhere?

$(document).ready(function() {
   var isChange = false;
   var editObj = $("input,textarea,select");
    editObj.change(function () {
        isChange = true;
        $(this).addClass("editing");
   });

   $(window).bind("beforeunload", function (e) {
       if (isChange || editObj.hasClass("editing")) {
           return "";
       }
   });

   $("button").click(function (e) {
        editObj.removeClass("editing");
   });
});

submit

  <button type="submit" id="submit">SUBMIT</button>

when input,textarea,select is edited, a prompt will appear. Use Google F12 to confirm that you will see editing class
on this object, but what is strange is that
shows that there is a button alarm removeClass
behind it, or does it show a prompt window every time you press SUBMIT?.?
is there an order where there is a sequence?


   $("button").click(function (e) {
        e.preventDefault();
        editObj.removeClass('editing');
   });

add

to click
isChange=false;
Menu