Fix overscroll growing the item pane on Windows 11

This commit is contained in:
Abe Jellinek 2023-12-01 13:26:51 -05:00 committed by Dan Stillman
parent ef608c094a
commit dacfe68a28

View file

@ -154,7 +154,10 @@
let minHeight = this._minScrollHeight; let minHeight = this._minScrollHeight;
if (minHeight) { if (minHeight) {
let newMinScrollHeight = this._container.scrollTop + this._container.clientHeight; 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; return;
} }
this._minScrollHeight = newMinScrollHeight; this._minScrollHeight = newMinScrollHeight;