<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - stepUp/stepDown throw InvalidStateError when number input is empty"
   href="https://bugs.webkit.org/show_bug.cgi?id=192587">192587</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>stepUp/stepDown throw InvalidStateError when number input is empty
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari 12
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>macOS 10.14
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Forms
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>feliziani.emanuele@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>cdumez@apple.com, wenson_hsieh@apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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: <a href="https://7zyy3zrq21.codesandbox.io/">https://7zyy3zrq21.codesandbox.io/</a> (you can access the editor page for quick tweaking here: <a href="https://codesandbox.io/s/7zyy3zrq21">https://codesandbox.io/s/7zyy3zrq21</a>)
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>