Closed Bug 1431041 Opened 6 years ago Closed 6 years ago

:placeholder-shown doesn't work for input type number

Categories

(Core :: DOM: Core & HTML, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: ntgdpl, Assigned: emilio)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20180104112904

Steps to reproduce:

Demo - https://codepen.io/anon/pen/eyPMrZ

1. create input with type number
2. set :placeholder-shown styles on number input


Actual results:

Placeholder is visible, :placeholder-shown styles haven't been applied.


Expected results:

:placeholder-shown styles should be applied.
Confirmed on latest nightly
Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
Product: Firefox → Core
This is more like a DOM bug, but I'll take it anyway. Thanks for the report, and thanks Flore!
Assignee: nobody → emilio
Component: CSS Parsing and Computation → DOM: Core & HTML
Priority: -- → P2
Comment on attachment 8943245 [details]
Bug 1431041: Make placeholder apply to <input type="number">.

https://reviewboard.mozilla.org/r/213572/#review219338

And the placeholder is cleared correctly when some value is set to the input element?
Attachment #8943245 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] (please try to find other reviewers for non-web components patches) from comment #5)
> Comment on attachment 8943245 [details]
> Bug 1431041: Make placeholder apply to <input type="number">.
> 
> https://reviewboard.mozilla.org/r/213572/#review219338
> 
> And the placeholder is cleared correctly when some value is set to the input
> element?

Blerg, yeah, though I only tested it with valid values. Patch incoming...
Comment on attachment 8943335 [details]
Bug 1431041: Fix placeholder-shown when the value of the input is invalid.

https://reviewboard.mozilla.org/r/213646/#review219514
Attachment #8943335 - Flags: review?(bugs) → review+
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7a4c3ab0ade8
Make placeholder apply to <input type="number">. r=smaug
https://hg.mozilla.org/integration/autoland/rev/57641ee7058f
Fix placeholder-shown when the value of the input is invalid. r=smaug
See Also: → 1431431
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fbf8db3f65eb
Make placeholder apply to <input type="number">. r=smaug
https://hg.mozilla.org/integration/autoland/rev/b06e69e9a326
Fix placeholder-shown when the value of the input is invalid. r=smaug
Thanks natalia, pushed with a fix and with a reftest splitted for android.
Flags: needinfo?(emilio)
https://hg.mozilla.org/mozilla-central/rev/fbf8db3f65eb
https://hg.mozilla.org/mozilla-central/rev/b06e69e9a326
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: