manage: save scrollY in onbeforeunload (less buggy)
This commit is contained in:
parent
1df76c6929
commit
8bec1d61bd
|
@ -61,11 +61,7 @@ function initGlobalEvents() {
|
||||||
};
|
};
|
||||||
|
|
||||||
// remember scroll position on normal history navigation
|
// remember scroll position on normal history navigation
|
||||||
document.addEventListener('visibilitychange', () => {
|
window.onbeforeunload = rememberScrollPosition;
|
||||||
if (document.visibilityState != 'visible') {
|
|
||||||
rememberScrollPosition();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const [className, checkbox] of [
|
for (const [className, checkbox] of [
|
||||||
['enabled-only', $('#manage.onlyEnabled')],
|
['enabled-only', $('#manage.onlyEnabled')],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user