question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does this lib support <input type="color"/> ?

See original GitHub issue

Does this lib support <input type="color"/> ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
visualjerkcommented, Aug 5, 2020

<input type="color" /> is a bit tricky, as most browsers display it as a color picker.

As you can see here typing on these doesn’t trigger an input event or change the inputs value.

So in order to test those you would probably have to use dom-testing-library fireEvent to dispatch an input event:

fireEvent.input(colorInputElement, {target: {value: '#333333'}})

Maybe we find a solution that comes closer to how a user interacts with these kind of inputs, but I assume it is pretty hard to do inside an emulated dom.

1reaction
kentcdoddscommented, Aug 9, 2020

Yeah, I think a new section titled “Known issues” or “Known limitations” would be useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<input type="color"> - HTML: HyperText Markup Language
Inputs of type color are simple, due to the limited number of attributes they support. Providing a default color. You can update the...
Read more >
Color input type | Can I use... Support tables for HTML5, CSS3 ...
Color input type. - LS. Form field allowing the user to select a color. Usage % of. all users, all tracked, tracked desktop,...
Read more >
input(type-color)_element (html) | Accessibility Support
The input element represents a color well control, for setting the element's value to a string representing a simple color. Age of results....
Read more >
How to remove line from input type color - css - Stack Overflow
Show activity on this post. to remove the line you just need to use following css code input::-webkit-color-swatch { border: none; }.
Read more >
The HTML5 Color Input - the new code
Like the <progress> input, the default appearence of the color dialog is strongly dependant on the browser and its underlying operating system.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found