Skip to content

Commit 781284a

Browse files
authored
Fix for calling non-cancellable scroll events (#5771)
1 parent a8b8f43 commit 781284a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/tender-tools-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-select': patch
3+
---
4+
5+
Fix for calling non-cancellable scroll events

packages/react-select/src/internal/useScrollLock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const LOCK_STYLES = {
1616
};
1717

1818
function preventTouchMove(e: TouchEvent) {
19-
e.preventDefault();
19+
if (e.cancelable) e.preventDefault();
2020
}
2121

2222
function allowTouchMove(e: TouchEvent) {

0 commit comments

Comments
 (0)