How to ensure correct HTML color input is updated?

Viewed 25

Create two color input elements, then using specifically macos Firefox (Big Sur, latest updates applied) observe that:

  • opening the colour picker and modifying a colour correctly affects the selected input
  • without closing the picker, double click the next input and modifying a colour correctly affects the newly selected input
  • now double click the first input again, try to modify the colour - the second input is incorrectly updated instead.

I have a non-trivial example of multiple colour input in a single view, and have also now replicated the issue in a simplified example to confirm it isn't our implementation going awry.

Worse, with several inputs in a single view (and maybe this part is our implementation) the above bug appears to compound to the point where the inputs no longer invoke a colour picker. No browser crash or page hangs etc, just apparently non-functional.

<input type="color" id="me" />
<input type="color" id="you" />

The above is all you need to replicate the issue. Live example also here: https://codepen.io/davewallace/pen/KKaGPLX

Possibly a browser/OS combination bug, would appreciate advice or thoughts.

1 Answers
Related