[Webkit-unassigned] [Bug 192587] New: stepUp/stepDown throw InvalidStateError when number input is empty
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 11 06:19:01 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=192587
Bug ID: 192587
Summary: stepUp/stepDown throw InvalidStateError when number
input is empty
Product: WebKit
Version: Safari 12
Hardware: Macintosh
OS: macOS 10.14
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
Assignee: webkit-unassigned at lists.webkit.org
Reporter: feliziani.emanuele at gmail.com
CC: cdumez at apple.com, wenson_hsieh at apple.com
Overview: When an input type=number field is empty, calling stepUp or stepDown on it throws InvalidStateError. Other browsers assume the empty value as 0 and act accordingly.
Steps to Reproduce:
1) Open this test page with only the input field and a button to trigger stepUp: https://7zyy3zrq21.codesandbox.io/ (you can access the editor page for quick tweaking here: https://codesandbox.io/s/7zyy3zrq21)
2) Click on the button
Actual Result: The input field throws InvalidStateError and the value is not changed
Expected Result: The value should be set to 0.01 (assume 0 + step). If a min attribute is set, the value should be set equal to the min attribute. The described behaviour is what happens by clicking on the native UI controls of the input type=number or by using the up/down arrows.
Additional Information: The expected result is present in both Chrome and Firefox.
--
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/20181211/ce055bea/attachment.html>
More information about the webkit-unassigned
mailing list