From 4df3a90b3d638e18b9607a5332033df7ceb0ec55 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 2 May 2020 23:52:36 +0200 Subject: [PATCH] luci-base: ui.js: reset scroll position when opening modal overlay Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 11c48daae..c206e02af 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -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; }, -- 2.25.1