Skip to content

Commit 544c8a6

Browse files
author
PR Batch Tester
committed
fix(desktop): ignore motionless wheels before scroller ownership
1 parent 28b9236 commit 544c8a6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎apps/web/src/components/HistorySwipeNavigation.browser.test.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ describe("HistorySwipeNavigation", () => {
5959
[[1, "remove"], ["end"], ["begin"], [130]],
6060
"forward",
6161
],
62+
[
63+
"a history gesture after zero-delta contact on a scroller",
64+
"shadow",
65+
400,
66+
[[0, "remove"], ["begin"], [130]],
67+
"forward",
68+
],
6269
[
6370
"a scroll begin after an ignored zoom wheel",
6471
"none",

‎apps/web/src/components/HistorySwipeNavigation.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export function HistorySwipeNavigation() {
118118
}
119119
if (gesture.kind === "ignored") return;
120120
if (gesture.kind === "pending") {
121+
if (event.deltaX === 0 && event.deltaY === 0) return;
121122
const path = event.composedPath();
122123
// Claim content scrolling while its layout still exists, before a possible remount.
123124
if (isInHorizontalScroller(path)) {

0 commit comments

Comments
 (0)