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.

bug(MatInputHarness): Does not properly set value with <input type="color">

See original GitHub issue

Reproduction

See StackBlitz: https://stackblitz.com/edit/components-issue-3u5pnf?file=src/app/app.component.spec.ts

Steps to reproduce:

  1. Using the MatInputHarness, setValue('#123456') (or any other color) of an <input type="color">.
  2. 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, May 28, 2020

The fix for this issue should fix yours as well @tobiasschweizer.

0reactions
angular-automatic-lock-bot[bot]commented, Jul 12, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

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