luci-base: ui.js: reset scroll position when opening modal overlay
authorJo-Philipp Wich <jo@mein.io>
Sat, 2 May 2020 21:52:36 +0000 (23:52 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sat, 2 May 2020 21:53:03 +0000 (23:53 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 11c48daaeb9e22a49759a9a1f59f9d7d22dad0bc..c206e02af8e00c8f48d977e301fcc5d539adaaa5 100644 (file)
@@ -3132,6 +3132,7 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
                dom.append(dlg, children);
 
                document.body.classList.add('modal-overlay-active');
+               modalDiv.scrollTop = 0;
 
                return dlg;
        },