Selection methods should not apply to input type=number

RESOLVED FIXED in Firefox 51

Status

()

Core
DOM: Core & HTML
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jessica, Assigned: Ehsan)

Tracking

Trunk
mozilla51
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Per the current whatwg spec [1], selectionStart, selectionEnd, selectionDirection, setRangeText() and setSelectionRange() should only apply to input type=text, search, url, telephone and password. But since bug 1003741, we apply them to input type=number as well.

[1] https://html.spec.whatwg.org/multipage/forms.html#do-not-apply
Feel free to change the priority if you see fit, Jessica.
Priority: -- → P3
Ehsan, any idea why bug 1003741 happened?
Flags: needinfo?(ehsan)
(Assignee)

Comment 3

2 years ago
Hmm, I'm not sure what I was thinking.  :(

We clearly should not support any of these for input type=number.
Assignee: nobody → ehsan
Flags: needinfo?(ehsan)
(Assignee)

Updated

2 years ago
Depends on: 1297225
(Assignee)

Comment 4

2 years ago
Created attachment 8783748 [details] [diff] [review]
Revert parts of bug 1003741 which were added to make selection APIs work on <input type=number>

In particular we keep the frame a form control frame so that it gets the
correct CSS box sizing by the layout code.
Attachment #8783748 - Flags: review?(amarchesini)
Attachment #8783748 - Flags: review?(amarchesini) → review+

Comment 5

2 years ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8f3b3f116e6a
Revert parts of bug 1003741 which were added to make selection APIs work on <input type=number>; r=baku
https://hg.mozilla.org/mozilla-central/rev/8f3b3f116e6a
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox51: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.