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)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: andrew, Assigned: MatsPalmgren_bugz)

Details

Attachments

(1 file)

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.
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Attachment #8722813 - Flags: review?(jwatt)
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+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: