Commit 53d00da8 authored by Ad Schellevis's avatar Ad Schellevis

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
parent 7c18b025
......@@ -229,12 +229,12 @@ function watchScrollPosition() {
// link on scroll event handler
$(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
$( document ).ready(function() {
var scrollpos = localStorage.getItem('scrollpos');
var scrollpos = sessionStorage.getItem('scrollpos');
if (scrollpos != null) {
if (scrollpos.split('|')[0] == current_location()) {
$(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