Skip to content

Commit

Permalink
Fix for calling non-cancellable scroll events
Browse files Browse the repository at this point in the history
  • Loading branch information
tu4mo committed Jul 20, 2023
1 parent 011a9d9 commit d6a9040
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 d6a9040

Please sign in to comment.