Skip to content

Commit

Permalink
Merge pull request #752 from leibowitz/fix-prevent-default
Browse files Browse the repository at this point in the history
fix: check if event is cancelable before calling preventDefault
  • Loading branch information
clauderic authored Mar 19, 2021
2 parents 92b5d48 + fa752bb commit 6c72ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SortableContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export default function sortableContainer(
const {onSortMove} = this.props;

// Prevent scrolling on mobile
if (typeof event.preventDefault === 'function') {
if (typeof event.preventDefault === 'function' && event.cancelable) {
event.preventDefault();
}

Expand Down

0 comments on commit 6c72ec2

Please sign in to comment.