<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>192587</bug_id>
          
          <creation_ts>2018-12-11 06:19:01 -0800</creation_ts>
          <short_desc>stepUp/stepDown throw InvalidStateError when number input is empty</short_desc>
          <delta_ts>2022-05-30 17:38:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>Safari 12</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>235509</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Emanuele Feliziani">feliziani.emanuele</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>feliziani.emanuele</cc>
    
    <cc>karlcow</cc>
    
    <cc>pascoe</cc>
    
    <cc>rik</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1486913</commentid>
    <comment_count>0</comment_count>
    <who name="Emanuele Feliziani">feliziani.emanuele</who>
    <bug_when>2018-12-11 06:19:01 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872814</commentid>
    <comment_count>1</comment_count>
    <who name="Anthony Ricaud">rik</who>
    <bug_when>2022-05-30 14:27:54 -0700</bug_when>
    <thetext>I&apos;m not sure when that happened but it seems to be fixed in the Safari Technology Preview 146.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872822</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-05-30 14:58:54 -0700</bug_when>
    <thetext>This might have been fixed by https://bugs.webkit.org/show_bug.cgi?id=235509</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872823</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-30 14:59:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/94123026&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1872847</commentid>
    <comment_count>4</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2022-05-30 17:38:30 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 235509 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>