lesca-click
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -63,3 +63,5 @@ var __assign = (this && this.__assign) || function () { | ||
var areWePreventDefault = function (e) { | ||
var preventDefault = state.preventDefault; | ||
var preventDefault = state.preventDefault, enabled = state.enabled; | ||
if (!enabled) | ||
return; | ||
var root = (0, constants_1.FIND_ROOT)(e); | ||
@@ -109,4 +111,3 @@ var isRoot = false; | ||
return; | ||
if (state.enabled) | ||
areWePreventDefault(e); | ||
areWePreventDefault(e); | ||
var dx = mousePropertyDown.x, dy = mousePropertyDown.y; | ||
@@ -113,0 +114,0 @@ moveOffsetProperty.x = x - dx; |
{ | ||
"name": "lesca-click", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "use for prevent browser default behavior. usually used in web without scroll app.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -56,3 +56,4 @@ import { GET_DEVICE, CHECK_PARENT_HAS_CLASS, FIND_ROOT } from './constants'; | ||
const areWePreventDefault = (e: TouchEvent | MouseEvent) => { | ||
const { preventDefault } = state; | ||
const { preventDefault, enabled } = state; | ||
if (!enabled) return; | ||
const root = FIND_ROOT(e); | ||
@@ -107,3 +108,3 @@ let isRoot = false; | ||
if (state.enabled) areWePreventDefault(e); | ||
areWePreventDefault(e); | ||
@@ -110,0 +111,0 @@ const { x: dx, y: dy } = mousePropertyDown; |
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
356539
1991