[Webkit-unassigned] [Bug 242063] New: Resetting the value of an input file to null should make it invalid
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 28 09:40:14 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=242063
Bug ID: 242063
Summary: Resetting the value of an input file to null should
make it invalid
Product: WebKit
Version: Safari 15
Hardware: Mac (Intel)
OS: macOS 12
Status: NEW
Severity: Minor
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: felipe at fluente.me
I'm trying to select an input[type="file"]:invalid but it doesn't work on Safari.
That's because Safari doesn't mark it as invalid when this FormElement value is reset to "" or null.
Isolated preview: https://codepen.io/FelipePS/pen/OJvJmoK
How to reproduce error:
1) On load, input is invalid (background-color light blue) because it's empty and required.
2) Add a file to it. It changes to valid as expected, assuming background-color light grey.
3) Click "Remove file" to reset the input.
Expected behaviour: Upon clicking "Remove file", it should assume background-color light blue again, because it's now empty and it's a required field. Chrome 102 and Firefox 100 behave as expected.
Current behaviour: Safari maintains the input field as valid (background-color light grey).
--
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/20220628/d8f1b46a/attachment.htm>
More information about the webkit-unassigned
mailing list