luci-base: ui.js: reset scroll position when opening modal overlay
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
e3ef463ccd
commit
4df3a90b3d
1 changed files with 1 additions and 0 deletions
|
@ -3132,6 +3132,7 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
|
||||||
dom.append(dlg, children);
|
dom.append(dlg, children);
|
||||||
|
|
||||||
document.body.classList.add('modal-overlay-active');
|
document.body.classList.add('modal-overlay-active');
|
||||||
|
modalDiv.scrollTop = 0;
|
||||||
|
|
||||||
return dlg;
|
return dlg;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue