- do not scroll to top if modal dialog is open

This commit is contained in:
maxpozdeev 2022-11-12 18:26:36 +03:00
parent 9e4b8776d7
commit d71400ea63
2 changed files with 6 additions and 3 deletions

View file

@ -2821,7 +2821,6 @@ function mttModalDialog(dialogType = 'alert')
this.close = function() {
$("#modal_overlay, #modal").hide();
$("body").css("overflow", "");
$("#btnModalOk").off('click');
$("#btnModalCancel").off('click');
$("#modalMessage").text('');
@ -2890,7 +2889,6 @@ function mttModalDialog(dialogType = 'alert')
dialog.close();
}
});
$("body").css("overflow", "hidden");
$("#modal_overlay, #modal").show();
return dialog;
};

View file

@ -101,7 +101,11 @@
/* default style */
html { height:100%; overflow-y:scroll; font-size:14px; /* =1rem */ }
html {
height:100%;
overflow-y:hidden; /* for modal overlay */
font-size:14px; /* =1rem */
}
body {
margin: 0px;
padding: 0px;
@ -111,6 +115,7 @@ body {
display:flex;
flex-direction:column;
align-items:center;
overflow-y: scroll; /* always show scrollbar */
}
body, td, th, input, textarea, select, button {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", /*Roboto,*/ Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";