Closed
Bug 1250315
Opened 9 years ago
Closed 9 years ago
input type="number" matches :-moz-read-only when it is not read only
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
mozilla47
| Tracking | Status | |
|---|---|---|
| firefox47 | --- | fixed |
People
(Reporter: andrew, Assigned: MatsPalmgren_bugz)
Details
Attachments
(1 file)
|
5.57 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build ID: 20160222004010
Steps to reproduce:
1. Create an input type="number"
2. Add CSS for :-moz-read-only
https://jsfiddle.net/tp0s1nbb/2/
Actual results:
The number input was matched by the :-moz-read-only selector.
Expected results:
The number input should not be matched by the :-moz-read-only selector.
| Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → mats
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8722813 -
Flags: review?(jwatt)
Comment 2•9 years ago
|
||
Comment on attachment 8722813 [details] [diff] [review]
Make <input type=number readonly> match :-moz-read-only and allow context events.
Review of attachment 8722813 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/events/EventStateManager.cpp
@@ +1508,5 @@
> else if (mGestureDownContent->IsHTMLElement()) {
> nsCOMPtr<nsIFormControl> formCtrl(do_QueryInterface(mGestureDownContent));
>
> if (formCtrl) {
> + allowedToDispatch = formCtrl->IsTextOrNumberControl(false) ||
While you're here can you make this:
IsTextOrNumberControl(/*aExcludePassword*/ false)
::: dom/html/nsGenericHTMLElement.cpp
@@ +2368,5 @@
> }
>
> // Make the text controls read-write
> if (!state.HasState(NS_EVENT_STATE_MOZ_READWRITE) &&
> + IsTextOrNumberControl(false)) {
And here
Attachment #8722813 -
Flags: review?(jwatt) → review+
Comment 4•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•