Skip to content

Commit fa752bb

Browse files
committed
fix: check event cancelable before preventDefault
Avoid issues on mobile where an error is triggered when calling preventDefault on an event that cannot be cancelled. Fix these kind of error messages: [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
1 parent 35996f5 commit fa752bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SortableContainer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ export default function sortableContainer(
452452
const {onSortMove} = this.props;
453453

454454
// Prevent scrolling on mobile
455-
if (typeof event.preventDefault === 'function') {
455+
if (typeof event.preventDefault === 'function' && event.cancelable) {
456456
event.preventDefault();
457457
}
458458

0 commit comments

Comments
 (0)