From dacfe68a28c34d28ea72d84e71bd404560389cfd Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 1 Dec 2023 13:26:51 -0500 Subject: [PATCH] Fix overscroll growing the item pane on Windows 11 --- chrome/content/zotero/elements/itemPaneSidenav.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/itemPaneSidenav.js b/chrome/content/zotero/elements/itemPaneSidenav.js index 945727fba2..e208267690 100644 --- a/chrome/content/zotero/elements/itemPaneSidenav.js +++ b/chrome/content/zotero/elements/itemPaneSidenav.js @@ -154,7 +154,10 @@ let minHeight = this._minScrollHeight; if (minHeight) { let newMinScrollHeight = this._container.scrollTop + this._container.clientHeight; - if (this.pinnedPane && newMinScrollHeight < this._pinnedPaneMinScrollHeight) { + // Ignore overscroll (which generates scroll events on Windows 11, unlike on macOS) + // and don't shrink below the pinned pane's min scroll height + if (newMinScrollHeight > this._container.scrollHeight + || this.pinnedPane && newMinScrollHeight < this._pinnedPaneMinScrollHeight) { return; } this._minScrollHeight = newMinScrollHeight;