From 1707651357b5b44e0c794bad4372984ff68eb912 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Mon, 4 Dec 2023 03:44:10 +0100 Subject: [PATCH] Merge pull request #6295 from jjm2473/patch-1 luci-mod-status: fix iptables jump on argon theme (cherry picked from commit 706668243b8617d5c5529ac76e54f84dc57203e3) --- .../htdocs/luci-static/resources/view/status/iptables.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js index 951c31218d..743d95000c 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js @@ -252,7 +252,11 @@ return view.extend({ elem = document.getElementById('rule_%s_%s'.format(table.toLowerCase(), chain)); if (elem) { - (document.documentElement || document.body.parentNode || document.body).scrollTop = elem.offsetTop - 40; + if (elem.scrollIntoView) { + elem.scrollIntoView(); + } else { + (document.documentElement || document.body.parentNode || document.body).scrollTop = elem.offsetTop - 40; + } elem.classList.remove('flash'); void elem.offsetWidth; elem.classList.add('flash'); -- 2.30.2