Bug 166930 - Value of a color input does not update visually when using setAttribute
Summary: Value of a color input does not update visually when using setAttribute
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: Macintosh macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-11 10:22 PST by Darryl Pogue
Modified: 2017-01-11 19:13 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darryl Pogue 2017-01-11 10:22:39 PST
With an <input type="color">, if you set the value dynamically via setAttribute('value', '#ff0000') it still shows the input color visually as black rather than the updated value (red, in this case).
The actual value of the input is correct, and if you open the color picker then it shows the correct value selected.

Here's an example JSFiddle which starts out black and sets the value via setAttribute after 1.5 seconds: https://jsfiddle.net/1wLsa0jc/
Comment 1 Radar WebKit Bug Importer 2017-01-11 19:13:22 PST
<rdar://problem/29983218>