Skip to content

Commit

Permalink
Add cancelable before preventDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrybendy committed Jan 20, 2021
1 parent 71449a9 commit 4e763d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ var vueTouchEvents = {
e.stopPropagation();
}

if (binding.modifiers.prevent) {
if (binding.modifiers.prevent && e.cancelable) {
e.preventDefault();
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue2-touch-events",
"version": "3.1.0",
"version": "3.1.1",
"description": "Simple touch events support for vueJS2",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 4e763d7

Please sign in to comment.