Skip to content

Commit

Permalink
Fix for calling non-cancellable scroll events (#5672)
Browse files Browse the repository at this point in the history
Co-authored-by: Luke Bennett <[email protected]>
  • Loading branch information
tu4mo and lukebennett88 authored Oct 2, 2023
1 parent b284329 commit f6315cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brown-lemons-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-select': patch
---

Fix for calling non-cancellable scroll events
2 changes: 1 addition & 1 deletion packages/react-select/src/internal/useScrollCapture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef } from 'react';
import { supportsPassiveEvents } from '../utils';

const cancelScroll = (event: WheelEvent | TouchEvent) => {
event.preventDefault();
if (event.cancelable) event.preventDefault();
event.stopPropagation();
};

Expand Down

0 comments on commit f6315cd

Please sign in to comment.