[Webkit-unassigned] [Bug 227698] New: Can't open <input type=color> with HTMLElement.click() when color input created as part of click event
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 6 02:47:22 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=227698
Bug ID: 227698
Summary: Can't open <input type=color> with HTMLElement.click()
when color input created as part of click event
Product: WebKit
Version: Safari 14
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: UI Events
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dan at moqups.com
Created attachment 432913
--> https://bugs.webkit.org/attachment.cgi?id=432913&action=review
input type=color vs. type=file in various scenarios
As with other types of inputs, color inputs can be activated by calling their `HTMLElement.click()` method. However, invoking `inputElement.click()` immediately after creating the `inputElement` DOM element and attaching it to the document tree has no effect. Other types of inputs (e.g. `file`) works well even in this scenario.
In the attached test case:
A. Open existing input element with immediate `click()` — works for both `file` and `color` types;
B. Open existing input element with delayed `click()` — works for both `file` and `color` types;
C. Create input element as part of gesture, immediate `click()` — works for `file` type but NOT `color` type;
D. Create input element as part of gesture, delayed `click()` — works for both `file` and `color` types.
In other words:
* color inputs don't work in scenario C, although it seems they should;
* color inputs can be made to work by delaying the `click()` call with `window.setTimeout(() => { inputEl.click(); }, 0)`.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210706/d4a46639/attachment-0001.htm>
More information about the webkit-unassigned
mailing list