diff --git a/.changeset/mighty-melons-admire.md b/.changeset/mighty-melons-admire.md new file mode 100644 index 00000000..8572e80f --- /dev/null +++ b/.changeset/mighty-melons-admire.md @@ -0,0 +1,5 @@ +--- +'@tanstack/virtual-core': patch +--- + +fix(virtual-core): set `useScrollendEvent` default to false for bette… diff --git a/docs/api/virtualizer.md b/docs/api/virtualizer.md index 09f91f4c..2a92c7e5 100644 --- a/docs/api/virtualizer.md +++ b/docs/api/virtualizer.md @@ -248,7 +248,7 @@ The implementation of this option is driven by the need for a reliable mechanism useScrollendEvent: boolean ``` -This option allows you to switch to use debounced fallback to reset the isScrolling instance property after `isScrollingResetDelay` milliseconds. The default value is `true`. +Determines whether to use the native scrollend event to detect when scrolling has stopped. If set to false, a debounced fallback is used to reset the isScrolling instance property after isScrollingResetDelay milliseconds. The default value is `false`. The implementation of this option is driven by the need for a reliable mechanism to handle scrolling behavior across different browsers. Until all browsers uniformly support the scrollEnd event. diff --git a/packages/virtual-core/src/index.ts b/packages/virtual-core/src/index.ts index d35427db..438c9592 100644 --- a/packages/virtual-core/src/index.ts +++ b/packages/virtual-core/src/index.ts @@ -438,7 +438,7 @@ export class Virtualizer< isScrollingResetDelay: 150, enabled: true, isRtl: false, - useScrollendEvent: true, + useScrollendEvent: false, useAnimationFrameWithResizeObserver: false, ...opts, }