Commit f2642562 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

oops, meant sessionStorage in stead of localStorage, no need to keep things...

oops, meant sessionStorage in stead of localStorage, no need to keep things beyond the duration of the session. https://github.com/opnsense/core/issues/840

(cherry picked from commit 53d00da8)
parent 1d883b05
...@@ -229,12 +229,12 @@ function watchScrollPosition() { ...@@ -229,12 +229,12 @@ function watchScrollPosition() {
// link on scroll event handler // link on scroll event handler
$(window).scroll(function(){ $(window).scroll(function(){
localStorage.setItem('scrollpos', current_location()+"|"+$(window).scrollTop()); sessionStorage.setItem('scrollpos', current_location()+"|"+$(window).scrollTop());
}); });
// move to last known position on page load // move to last known position on page load
$( document ).ready(function() { $( document ).ready(function() {
var scrollpos = localStorage.getItem('scrollpos'); var scrollpos = sessionStorage.getItem('scrollpos');
if (scrollpos != null) { if (scrollpos != null) {
if (scrollpos.split('|')[0] == current_location()) { if (scrollpos.split('|')[0] == current_location()) {
$(window).scrollTop(scrollpos.split('|')[1]); $(window).scrollTop(scrollpos.split('|')[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment