Add touch events + corrections (IE8-...) + class prefix isolation + improvements#47
Open
aruben-c wants to merge 25 commits intoPitPik:masterfrom
Open
Add touch events + corrections (IE8-...) + class prefix isolation + improvements#47aruben-c wants to merge 25 commits intoPitPik:masterfrom
aruben-c wants to merge 25 commits intoPitPik:masterfrom
Conversation
Add the events "touchstart", "touchmove" and "touchend" to also support touch devices. Need to change the files "README.md", "color.all.min.js", "javascript_implementation/jsColorPicker.min.js" Successfully tested on a smartphone with Android 4.4.2 / Chrome 51
See issue #1
See issue #1
IE8- fail with 'new' in same instance
See issue #5
See issue #5
Simplification of the function "addStyleSheet()" using innerHTML instead of createTextNode
See isuue #6
Add a namespace to allow storing the colorpicker into "namespace" instead "window"
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
For IE8- : use attachEvent/detachEvent instead of addEventListener/removeEventListener
Add a namespace to allow storing the colorpicker into "namespace" instead "window".
Add a namespace to allow storing the colorpicker into "namespace" instead "window".
Add a namespace to allow storing the colorpicker into "namespace" instead "window".
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
Add a namespace to allow storing the colorpicker into "namespace" instead "window".
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
Add a namespace to allow storing the colorpicker into "namespace" instead "window". Need: create the variable CPNamespace before calling executing the script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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