mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 10:14:33 -04:00
Remember sidebar position (#3231)
#fix https://github.com/FreshRSS/FreshRSS/issues/3209 Extracted from https://github.com/FreshRSS/FreshRSS/pull/3185
This commit is contained in:
1 parent
9ab05c7f67
commit
a69a7531b6
1 file changed
+7
@@ -697,6 +697,9 @@ function init_column_categories() {
|
||||
return;
|
||||
}
|
||||
|
||||
//Restore sidebar scroll position
|
||||
document.getElementById('sidebar').scrollTop = +sessionStorage.getItem('FreshRSS_sidebar_scrollTop');
|
||||
|
||||
document.getElementById('aside_feed').onclick = function (ev) {
|
||||
let a = ev.target.closest('.tree-folder > .tree-folder-title > a.dropdown-toggle');
|
||||
if (a) {
|
||||
@@ -1562,6 +1565,10 @@ function init_normal() {
|
||||
faviconNbUnread();
|
||||
|
||||
window.onbeforeunload = function (e) {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
if (sidebar) { //Save sidebar scroll position
|
||||
sessionStorage.setItem('FreshRSS_sidebar_scrollTop', sidebar.scrollTop);
|
||||
}
|
||||
if (mark_read_queue && mark_read_queue.length > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user