Hi,
I made some corrections and improvements to your ColorPicker.
You can see all of them in my GitHub repository.
Corrections:
IE8- fail with 'new' in same instance
mouseup event not fire on IE8-
document can differ from window.document
class prefix to isolate from higher class weight
Improvements:
Add touch events "touchstart", "touchmove" and "touchend" to also support touch devices.
class prefix to isolate from higher class weight
namespace
invalid hidden characters
Better addStyleSheet function
Tests:
Touch events successfully tested on a smartphone with Android 4.4.2 / Chrome 51.
IE8- tests OK
All others tested in IE8/11/Edge, Chrome, Firefox, Opera.
perhaps also the web site page, README.md, info.txt (because touch events are now added and others improvements).
For touch events, the files "javascript_implementation/jsColor.js" and "jQuery_implementation/jqColor.js" don't need to be changed (despite they call the event "mousedown").
But I changed them for the namespace.
The namespace add a constraint: the variable "var CPNamespace = window;" (or "var CPNamespace;") needs to be defined before loading the files.
(nb: the first parameter "window" of the functions can't be the namespace due to the use of "window.Math").
Hi, I made some corrections and improvements to your ColorPicker. You can see all of them in my GitHub repository.
Corrections:
Improvements:
Tests: Touch events successfully tested on a smartphone with Android 4.4.2 / Chrome 51. IE8- tests OK All others tested in IE8/11/Edge, Chrome, Firefox, Opera.
3 files are changed:
I also impacted into:
but, it's need to also change:
For touch events, the files "javascript_implementation/jsColor.js" and "jQuery_implementation/jqColor.js" don't need to be changed (despite they call the event "mousedown"). But I changed them for the namespace.
The namespace add a constraint: the variable "var CPNamespace = window;" (or "var CPNamespace;") needs to be defined before loading the files. (nb: the first parameter "window" of the functions can't be the namespace due to the use of "window.Math").
Thanks for this nice color picking widget. ARuben