Bug 263504 - Show console warning when input[type=color] is clicked without user gesture
Summary: Show console warning when input[type=color] is clicked without user gesture
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-10-21 17:45 PDT by Ahmad Saleem
Modified: 2023-10-23 23:31 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>