Bug 263504

Summary: Show console warning when input[type=color] is clicked without user gesture
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, inspector-bugzilla-changes, karlcow, web-inspector-bugs, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-10-21 17:45:36 PDT
Hi Team,

While going through Blink's commit, I came across commit, which we should merge to align with other browsers.

Blink Commit: https://chromium.googlesource.com/chromium/src/+/763af8e1bbc32e4833e2b64211c65d8aca804076

___

How to reproduce:

1) Create local html:

<body>
  <input id="color-picker" type="color" />
  <script>
    document.getElementById('color-picker').click();
  </script>
</body>

2) Load and see, there is no console warning in Safari but there is in Chrome:

A user gesture is required to show the color picker.
(anonymous) @ testpage_fiddle-0121.html:4

____

Just wanted to raise so we can fix it.

Thanks!
Comment 1 Alexey Proskuryakov 2023-10-23 09:12:38 PDT
Seems like a nice diagnostic for developers indeed. I don't think that console logging qualifies as "BrowserCompat" though.
Comment 2 Karl Dubost 2023-10-23 23:31:44 PDT
Yes This should probably be a feature for Web Inspector.
Comment 3 Radar WebKit Bug Importer 2023-10-23 23:31:56 PDT
<rdar://problem/117393527>