This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24588 - Why is selectionStart and selectionEnd not supported for input of type number? I see it as a hindrance to the flexibility of this type input. The spinner control is fine but why not let the user input [...]
Summary: Why is selectionStart and selectionEnd not supported for input of type number...
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 24587 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-08 12:05 UTC by contributor
Modified: 2014-02-21 21:09 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2014-02-08 12:05:05 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html
Multipage: http://www.whatwg.org/C#number-state-(type=number)
Complete: http://www.whatwg.org/c#number-state-(type=number)
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html

Comment:
Why is selectionStart and selectionEnd not supported for input of type number?
I see it as a hindrance to the flexibility of this type input. The spinner
control is fine but why not let the user input the value they want themselves.
Selectionstart and end allows me to control the restricted digit depending on
the position.  Maxlength not being supported is also questionable. I would
think that developers would like to limit the number of digits in an input and
avoid having to use custom javascript.

Posted from: 72.14.228.1 by aaron.labiaga@gmail.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.70 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2014-02-10 21:17:13 UTC
There's no guarantee that type=number is a text field at all. It could be purely a spinner control, for example. So there might be nothing to select. Or it might have multiple text fields, for example one per digit.
Comment 2 Ian 'Hixie' Hickson 2014-02-10 21:17:52 UTC
*** Bug 24587 has been marked as a duplicate of this bug. ***