Move #newsavename keydown event handler

This commit is contained in:
Gnome Ann 2021-09-01 14:12:12 -04:00
parent 24d57a7ac3
commit 7e896c98fe
1 changed files with 5 additions and 4 deletions

View File

@ -614,6 +614,11 @@ function buildLoadList(ar) {
} }
})(name); })(name);
$("#btn_rensaccept").off("click").on("click", submit); $("#btn_rensaccept").off("click").on("click", submit);
$("#newsavename").off("keydown").on("keydown", function (ev) {
if (ev.which == 13 && $(this).val() != "") {
submit();
}
});
$("#loadcontainerrename").removeClass("hidden").addClass("flex"); $("#loadcontainerrename").removeClass("hidden").addClass("flex");
$("#newsavename").val(name).select(); $("#newsavename").val(name).select();
} }
@ -1317,10 +1322,6 @@ $(document).ready(function(){
enableButtons([$("#btn_rensaccept")]); enableButtons([$("#btn_rensaccept")]);
} }
hide([$(".saveasoverwrite"), $(".popuperror")]); hide([$(".saveasoverwrite"), $(".popuperror")]);
}).on("keydown", function (ev) {
if (ev.which == 13 && $(this).val() != "") {
submit();
}
}); });
$("#btn_rensclose").on("click", function () { $("#btn_rensclose").on("click", function () {