virt table: don't propagate pageUp/Down on macOS (#5518)

Same as on all other platforms. That way, if the parent
container is scrollable, it will not scroll.
This commit is contained in:
Bogdan Abaev 2025-08-29 22:12:36 -07:00 • committed by Dan Stillman
parent 015769a9f8
commit 5a7444f424

View file

@ -336,11 +336,7 @@ class VirtualizedTable extends React.Component {
this._isMouseDrag = false;
this.preventScrollKeys = new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", " "]);
if (!Zotero.isMac) {
['PageUp', 'PageDown'].forEach(key => this.preventScrollKeys.add(key));
}
this.preventScrollKeys = new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", " ", "PageUp", "PageDown"]);
this.onSelection = oncePerAnimationFrame(this._onSelection);
}