Closed
Bug 982189
Opened 11 years ago
Closed 11 years ago
Readonly input type="number" can still be changed through arrows
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla31
People
(Reporter: cork, Assigned: agi)
References
Details
(Keywords: testcase)
Attachments
(2 files, 1 obsolete file)
210 bytes,
text/html
|
Details | |
2.64 KB,
patch
|
jst
:
review+
lsblakk
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Input field type number can still be changed through the arrows even if readonly is set.
STR:
1. Load a new clean profile
2. Load testcase
3. Click the up or down arrow in the input field
Expected result:
Nothing should happen as the field is readonly.
Actual result:
The value of the field is modified.
Assignee | ||
Comment 1•11 years ago
|
||
This should do the trick. The element wasn't checking at all if it was mutable.
Attachment #8394551 -
Flags: review?(jwatt)
Comment 3•11 years ago
|
||
(I noted this in the dupe, but the patch seems to address the keyboard up/down arrows only (which also mutate the value, even if readonly), not the mouse input case)
Assignee | ||
Comment 4•11 years ago
|
||
OK, I'll work on the rest then (the arrows are still broken with the patch above). Can someone assign me this bug? Thanks!
Updated•11 years ago
|
Assignee: nobody → agi.novanta
Assignee | ||
Comment 6•11 years ago
|
||
OK this should work! Thank you.
Attachment #8394551 -
Attachment is obsolete: true
Attachment #8394551 -
Flags: review?(jwatt)
Attachment #8398686 -
Flags: review?(jst)
Comment 7•11 years ago
|
||
Comment on attachment 8398686 [details] [diff] [review]
Fix Input type="number" immutability
Looks good!
Attachment #8398686 -
Flags: review?(jst) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Pushed to Try server (I accidentally used the message from another patch):
https://tbpl.mozilla.org/?tree=Try&rev=7d549b6716c0
The mochitest-dt failed for some weird reason, re-pushed again here:
https://tbpl.mozilla.org/?tree=Try&rev=3af9cdc30088
Everything seems fine.
Keywords: checkin-needed
Comment 9•11 years ago
|
||
Keywords: checkin-needed
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 11•11 years ago
|
||
Verified using the testcase that the value can no longer be modified using the spin buttons or the up / down arrow keys on latest Nightly (buildID: 20140427030204) under Win 7 64-bit, Ubuntu 32-bit and Mac OSX 10.8.5.
Status: RESOLVED → VERIFIED
QA Contact: petruta.rasa
Comment 14•11 years ago
|
||
Agi, shouldn't this be uplifted to beta considering the increasing no of duplicates?
Flags: needinfo?(agi.novanta)
Assignee | ||
Comment 16•10 years ago
|
||
Comment on attachment 8398686 [details] [diff] [review]
Fix Input type="number" immutability
I was thinking about it. Let's try.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 935506
User impact if declined: Number input can be changed even if disabled
Testing completed (on m-c, etc.): the patch has been verified and has been in m-c for a few days now
Risk to taking this patch (and alternatives if risky): the patch is reasonably safe, shouldn't pose any risk
String or IDL/UUID changes made by this patch: none
Attachment #8398686 -
Flags: approval-mozilla-beta?
Attachment #8398686 -
Flags: approval-mozilla-aurora?
Flags: needinfo?(agi.novanta)
Comment 17•10 years ago
|
||
Comment on attachment 8398686 [details] [diff] [review]
Fix Input type="number" immutability
We're in our final week of taking speculative fixes on Beta so we'll take this and make sure that we get the most bake time before ship. Will mark for tracking so this stays on our radar should there be any regressions or backout needed.
Attachment #8398686 -
Flags: approval-mozilla-beta?
Attachment #8398686 -
Flags: approval-mozilla-beta+
Attachment #8398686 -
Flags: approval-mozilla-aurora?
Attachment #8398686 -
Flags: approval-mozilla-aurora+
Updated•10 years ago
|
Assignee | ||
Comment 18•10 years ago
|
||
Thanks for the approval Lukas. I just applied the patch on my local copy of mozilla-beta and everything seems fine.
Thank you!
Keywords: checkin-needed
Comment 19•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/dcd4cf44e61b
This landed on trunk during the Gecko31 cycle, so this is already fixed on Aurora.
Keywords: checkin-needed
Comment 20•10 years ago
|
||
Updated•10 years ago
|
status-b2g-v1.4:
--- → fixed
status-b2g-v2.0:
--- → fixed
Comment 21•10 years ago
|
||
Marking as verified on 31 based on comment 11.
Comment 22•10 years ago
|
||
Still can see spinner's arrows in FF 34
<input placeholder="zzz" class="zzz" id="zzzz" name="zzzzz" readonly="True" step="0.01" type="number">
Chrome 37.0.2062.120 m hides them.
Comment 23•10 years ago
|
||
Sorry, input[type="number"][readonly] {
-moz-appearance: textfield;
}
input[type="number"][readonly]::-webkit-outer-spin-button,
input[type="number"][readonly]::-webkit-inner-spin-button {
-webkit-appearance: none;
}
works well.
You need to log in
before you can comment on or make changes to this bug.
Description
•