svelte-gestures
Advanced tools
Comparing version 1.3.1 to 1.3.2
# Changelog | ||
## 1.3.2 | ||
`press` gesture now preventDefault on contextmenu of its element and also adds `style.userSelect = 'none';` | ||
Bug resolved for case when `swipe` gesture reported wrong directions if used on scrollable area. | ||
## 1.3.1 | ||
@@ -4,0 +10,0 @@ |
@@ -181,2 +181,8 @@ const DEFAULT_DELAY = 300; | ||
}) { | ||
node.style.userSelect = 'none'; | ||
node.oncontextmenu = e => { | ||
e.preventDefault(); | ||
}; | ||
const gestureName = 'press'; | ||
@@ -311,3 +317,3 @@ let startTime; | ||
function onUp(activeEvents, event) { | ||
if (activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) { | ||
if (event.type === 'pointerup' && activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) { | ||
const x = event.clientX - clientX; | ||
@@ -314,0 +320,0 @@ const y = event.clientY - clientY; |
@@ -185,2 +185,8 @@ 'use strict'; | ||
}) { | ||
node.style.userSelect = 'none'; | ||
node.oncontextmenu = e => { | ||
e.preventDefault(); | ||
}; | ||
const gestureName = 'press'; | ||
@@ -315,3 +321,3 @@ let startTime; | ||
function onUp(activeEvents, event) { | ||
if (activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) { | ||
if (event.type === 'pointerup' && activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) { | ||
const x = event.clientX - clientX; | ||
@@ -318,0 +324,0 @@ const y = event.clientY - clientY; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"main": "dist/index.js", | ||
@@ -9,0 +9,0 @@ "module": "dist/index.esm.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39006
702