From: Paul Donald Date: Mon, 4 Dec 2023 02:44:10 +0000 (+0100) Subject: Merge pull request #6295 from jjm2473/patch-1 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=ce1e6a080ed7fd2494bcfd3f8db0edc3cbc137d0;p=project%2Fluci.git Merge pull request #6295 from jjm2473/patch-1 luci-mod-status: fix iptables jump on argon theme (cherry picked from commit 706668243b8617d5c5529ac76e54f84dc57203e3) --- 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 e409a5ac50..917dada57a 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');