diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-status/htdocs/luci-static/resources/view/status/iptables.js | 6 |
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 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'); |