mapbox / react-colorpickr

A themeable colorpicker with HSL and RGB support for React

Home Page:https://labs.mapbox.com/react-colorpickr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal errors in Chrome 61, Firefox 57

SKalt opened this issue · comments

In Chrome 61 and Firefox 57 this color picker fails to pick colors.

First, when no named groups are selected (such as when I click one icon), clicking the color editor results in the following error:
On each click in Chrome 61:

bundle.js:1 Uncaught TypeError: Cannot read property '0' of undefined
    at Object._dragStart (bundle.js:1)
    at Object.r (bundle.js:12)
    at o (bundle.js:10)
    at Object.s [as executeDispatchesInOrder] (bundle.js:10)
    at d (bundle.js:10)
    at m (bundle.js:10)
    at Array.forEach (<anonymous>)
    at r (bundle.js:14)
    at Object.processEventQueue (bundle.js:10)
    at r (bundle.js:12)

On only the first click in Firefox 57:

TypeError: t.changedTouches is undefined[Learn More] bundle.js:1:20908
	_dragStart https://www.mapbox.com/maki-icons/bundle.js:1:20908
	_dragStart self-hosted:953:17
	r https://www.mapbox.com/maki-icons/bundle.js:12:20509
	o https://www.mapbox.com/maki-icons/bundle.js:10:25824
	s https://www.mapbox.com/maki-icons/bundle.js:10:26041
	d https://www.mapbox.com/maki-icons/bundle.js:10:22210
	m https://www.mapbox.com/maki-icons/bundle.js:10:22338
	forEach self-hosted:273:13
	r https://www.mapbox.com/maki-icons/bundle.js:14:12401
	processEventQueue https://www.mapbox.com/maki-icons/bundle.js:10:23400
	r https://www.mapbox.com/maki-icons/bundle.js:12:20757
	handleTopLevel https://www.mapbox.com/maki-icons/bundle.js:12:20845
	a https://www.mapbox.com/maki-icons/bundle.js:12:21327
	perform https://www.mapbox.com/maki-icons/bundle.js:14:7944
	batchedUpdates https://www.mapbox.com/maki-icons/bundle.js:12:18060
	a https://www.mapbox.com/maki-icons/bundle.js:13:19782
	dispatchEvent https://www.mapbox.com/maki-icons/bundle.js:12:22344
	dispatchEvent self-hosted:997:17

After selecting and populating a named group, the error persists. Clicking the paddles on the HSV and attempting to edit the HSV values does not raise any errors, but also does not produce any changes. Editing alpha and hex values result in visible changes the value in question.

Are you reproducing these errors on https://www.mapbox.com/react-colorpickr/?

🤔 no ..

It is reproducible on my laptop with touchscreen in Chrome (both Linux and Windows).

I discovered this issue while using Mapbox Studio.
Here's a GIF - I'm clicking on it, but picker doesn't respond.

mapbox-studio

The touchscreen part is likely important: I had forgotten the original laptop I found this on was a touchscreen.
I'm glad it isn't just me!