From: Jo-Philipp Wich Date: Sat, 2 May 2020 21:52:36 +0000 (+0200) Subject: luci-base: ui.js: reset scroll position when opening modal overlay X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d51e0d807adf3739a93a35997a021c3ec0de6891;p=oweals%2Fluci.git luci-base: ui.js: reset scroll position when opening modal overlay Signed-off-by: Jo-Philipp Wich (cherry picked from commit 4df3a90b3d638e18b9607a5332033df7ceb0ec55) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 3638e3e1a..73e994736 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -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; },