Make colorpicker field use HTML5 native color picker #3387
Merged
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.
This removes the jquery.colorpicker.js dependency, reducing the overall
size of compiled assets.
The native color input element is builtin and so will have better a11y
support. It allows the browser, device, or a11y technology to present a
UI to the user to select a color. The value submitted by the form is a 6
digit hex, same as before.
Beyond the advantage of using a native UI element, this helps move
towards removing jQuery as a dependency or at least reducing its usage.
For additional details on the color input element, see:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/color
Uses Rails color_field for rendering:
https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-color_field
Refs #2893