summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-status/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorLiangbin Lian <jjm2473@gmail.com>2023-03-17 16:36:59 +0800
committerLiangbin Lian <jjm2473@gmail.com>2023-03-17 16:38:15 +0800
commitdb543b5fed5e2f22d9546d9184ee9a745dfa3609 (patch)
tree9e6bbfd006b97032888b90a0c825dda3ffde6e00 /modules/luci-mod-status/htdocs/luci-static/resources
parent51db83ce3c28c8140e1a87ff1006b462d4a08783 (diff)
luci-mod-status: fix iptables jump on argon theme
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js6
1 files changed, 5 insertions, 1 deletions
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');