Copy the event handlers from "Save As" to the Rename dialog

This commit is contained in:
Gnome Ann 2021-09-01 13:10:21 -04:00
parent 556835cd34
commit cb446d2113
1 changed files with 8 additions and 1 deletions

View File

@ -1300,7 +1300,14 @@ $(document).ready(function(){
hide([$(".saveasoverwrite"), $(".popuperror")]);
});
$("#newsavename").on("keydown", function (ev) {
$("#newsavename").on("input", function (ev) {
if($(this).val() == "") {
disableButtons([$("#btn_rensaccept")]);
} else {
enableButtons([$("#btn_rensaccept")]);
}
hide([$(".saveasoverwrite"), $(".popuperror")]);
}).on("keydown", function (ev) {
if (ev.which == 13 && $(this).val() != "") {
submit();
}