Skip to content

Commit 16a5e4c

Browse files
Haroenvsarahdayan
authored andcommitted
fix(InfiniteHits): prevent scroll on buttons (#109)
When you click these buttons in latest Chrome, it will keep those buttons on the same place in the viewport, which means that users will skip the next page of results. With this property added, that's fixed. This solution comes from https://bugs.chromium.org/p/chromium/issues/detail?id=1110323#c1 and has been verified by three customers so far.
1 parent c3d80f1 commit 16a5e4c

File tree

1 file changed

+7
-0
lines changed
  • packages/instantsearch-specs/src/scss/themes

1 file changed

+7
-0
lines changed

packages/instantsearch-specs/src/scss/themes/reset.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
}
5656
}
5757

58+
// Prevent InfiniteHits buttons from moving scroll position
59+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1110323
60+
.ais-InfiniteHits-loadPrevious,
61+
.ais-InfiniteHits-loadMore {
62+
overflow-anchor: none;
63+
}
64+
5865
// Reset widgets
5966

6067
.ais-Breadcrumb-list,

0 commit comments

Comments
 (0)