From 30b4577283ffe5e7d97d7bac7f6af0112c0c058d Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Thu, 11 Jan 2024 23:51:35 -0500 Subject: [PATCH] pinned panes for reader contextPane When tab selection changes, scroll to the pinned pane if there is one. --- chrome/content/zotero/contextPane.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chrome/content/zotero/contextPane.js b/chrome/content/zotero/contextPane.js index 4cdb519618..34cc2c3fbd 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -223,6 +223,10 @@ var ZoteroContextPane = new function () { _selectItemContext(ids[0]); _update(); + // When a loaded tab is selected, scroll to the pinned pane, if any + if (_sidenav.pinnedPane) { + _sidenav.scrollToPane(_sidenav.pinnedPane, 'instant'); + } } } }; @@ -352,6 +356,7 @@ var ZoteroContextPane = new function () { _updatePaneWidth(); _updateAddToNote(); + _sidenav.showPendingPane(); } function _togglePane(paneIndex) { @@ -927,5 +932,9 @@ var ZoteroContextPane = new function () { if (_itemPaneDeck.selectedPanel === container) { _sidenav.container = div; } + // When a tab is loaded, scroll to the pinned pane, if any + if (_sidenav.pinnedPane) { + _sidenav.scrollToPane(_sidenav.pinnedPane, 'instant'); + } } };