bug(MatInputHarness): Does not properly set value with <input type="color">
See original GitHub issueReproduction
See StackBlitz: https://stackblitz.com/edit/components-issue-3u5pnf?file=src/app/app.component.spec.ts
Steps to reproduce:
- Using the MatInputHarness,
setValue('#123456')
(or any other color) of an<input type="color">
. - Use
getValue()
to get the result.
Expected Behavior
The value should be #123456
.
Actual Behavior
It is always #000000
.
Environment
- Angular: 9.0.6
- CDK/Material: 9.1.2
- Browser(s): Chrome 80.0.3987.132, Safari 13.0.5
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 10.15.3
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
bug when getting value of type=“color” input using javascript
The message goes through, everything works fine. I am adding a color picker in the form and try to the get its value...
Read more ><input type="color"> - HTML: HyperText Markup Language
The value of an <input> element of type color is always a string which ... to set a default value, so that the...
Read more >Input | Angular Material
MAT_INPUT_VALUE_ACCESSOR. This token is used to inject the object whose value should be set into MatInput . If none is provided, the native ......
Read more >input type=color – color-well control (NEW) - HTML5
The input element with a type attribute whose value is " color " represents a color-well control, for setting the element's value to...
Read more >datalist for range/color inputs offer some default choices
By adding datalist to input[type=color] , users can now pick a color from developer selected color swatches as well as choosing arbitrary ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix for this issue should fix yours as well @tobiasschweizer.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.