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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27432</bug_id>
          
          <creation_ts>2014-11-25 17:08:12 +0000</creation_ts>
          <short_desc>The current [WHATWG] spec text for &lt;input type=number&gt; stepping can cause stepping in the opposite direction to the one requested</short_desc>
          <delta_ts>2015-07-09 12:12:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Watt">jwatt</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115474</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Watt">jwatt</who>
    <bug_when>2014-11-25 17:08:12 +0000</bug_when>
    <thetext>Right now Mozilla&apos;s &lt;input type=number&gt; stepping code has checks and tests to make sure that a step up never causes the value to decrease, and a step down never causes the value to increase. The current spec text seems to cause this to happen in certain circumstances. For example,

  data:text/html,&lt;input type=number value=1 max=0&gt;

Actually, checking Chrome I see that they prevent a stepUp() on that example from changing the value too, so it&apos;s not just Firefox.

We essentially prevent this by having a step between steps 8 and 9 that causes us to abort if we&apos;re doing a step up and &apos;value&apos; is less than the value before the step was initiated, and a similar check for step down.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121051</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 10:23:59 +0000</bug_when>
    <thetext>Making this a higher priority to actively seek more feedback on from implementers and webdevs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121888</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-08 19:17:34 +0000</bug_when>
    <thetext>https://github.com/w3c/spork/pull/15

This does two things:

1. modify step 5 to add a variable &quot;current value&quot;

[[
5. If applying the algorithm to convert a string to a number to the string given by the element&apos;s value does not result in an error, then let value be the result of that algorithm. Otherwise, let value be zero. Let current value be the same as value.
]]

2. Insert two steps before step 9 (which becomes step 11 below)

[[
9. If the method invoked was the stepDown() method and value is greater than current value, abort these steps.

10. If the method invoked was the stepUp() method and value is less than current value, abort these steps.

11. Let value as string be the result of running [...]
]]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121910</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2015-07-09 12:12:15 +0000</bug_when>
    <thetext>merged. Please reopen if further action is needed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>