We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4996045 commit cbbbe43Copy full SHA for cbbbe43
1 file changed
src/components/ScrollShadow/ScrollShadow.tsx
@@ -30,6 +30,7 @@ const ScrollShadow: ParentComponent<
30
const scrollHorizontally = (e: WheelEvent) => {
31
if (!isScrollable) return;
32
33
+ e.preventDefault();
34
const target = e.currentTarget as HTMLElement;
35
target.scrollLeft += e.deltaX + e.deltaY;
36
};
@@ -64,7 +65,7 @@ const ScrollShadow: ParentComponent<
64
65
init = false;
66
});
67
- scrollableContainer.addEventListener('wheel', scrollHorizontally, { passive: true });
68
+ scrollableContainer.addEventListener('wheel', scrollHorizontally);
69
sentinelShadowState.set(sentinelFirstEl, { el: shadowFirstEl, visible: false });
70
sentinelShadowState.set(sentinelLastEl, { el: shadowLastEl, visible: false });
71
observer.observe(sentinelFirstEl);
0 commit comments