From c58e3546742791d01f3b1540bc7c54e6b73c4a3a Mon Sep 17 00:00:00 2001 From: case Date: Mon, 29 Apr 2019 16:24:51 -0700 Subject: [PATCH] Remove `preventDefault` on passive events (#611) --- src/helpers/alpha.js | 1 - src/helpers/hue.js | 1 - src/helpers/saturation.js | 1 - 3 files changed, 3 deletions(-) diff --git a/src/helpers/alpha.js b/src/helpers/alpha.js index 076900b1..344999f7 100644 --- a/src/helpers/alpha.js +++ b/src/helpers/alpha.js @@ -1,5 +1,4 @@ export const calculateChange = (e, hsl, direction, initialA, container) => { - e.preventDefault() const containerWidth = container.clientWidth const containerHeight = container.clientHeight const x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX diff --git a/src/helpers/hue.js b/src/helpers/hue.js index 79df2b68..8cd6d3f9 100644 --- a/src/helpers/hue.js +++ b/src/helpers/hue.js @@ -1,5 +1,4 @@ export const calculateChange = (e, direction, hsl, container) => { - e.preventDefault() const containerWidth = container.clientWidth const containerHeight = container.clientHeight const x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX diff --git a/src/helpers/saturation.js b/src/helpers/saturation.js index 06689568..8cad4e62 100644 --- a/src/helpers/saturation.js +++ b/src/helpers/saturation.js @@ -1,5 +1,4 @@ export const calculateChange = (e, hsl, container) => { - e.preventDefault() const { width: containerWidth, height: containerHeight } = container.getBoundingClientRect() const x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX const y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY