-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add touch events + corrections (IE8-...) + class prefix isolation + improvements #47
Open
aruben-c
wants to merge
25
commits into
PitPik:master
Choose a base branch
from
aruben-c:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
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
aruben-c
changed the title
Add touch events
Add touch events + corrections (IE8-...) + class prefix isolation + improvements
Aug 18, 2016
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.
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