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>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4df3a90b3d638e18b9607a5332033df7ceb0ec55)

modules/luci-base/htdocs/luci-static/resources/ui.js

index 3638e3e1a133bb4e52f3614d3dc219d218f0243d..73e9947363ed3ebd4f21596b7543249e048b5eb6 100644 (file)
@@ -3028,6 +3028,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;
        },