Closed Bug 1698315 Opened 3 years ago Closed 3 years ago

Simplify placeholder / autofill preview visibility code.

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

I wrote this for bug 1698043 but it ended up not being how I fixed the bug, so splitting it up a bit.

Should be much simpler and doesn't need to deal with the different
stuff. We already have pseudo-classes for this, :autofill and
:placeholder-shown.

I initially wrote this because this is the only limitation that forces
us to have the placeholder text as a direct child of the text control
frame. In the end I kept that as-is, but this simplification is still
worth it.

We remove dom.placeholder.show_on_focus because it doesn't behave
correctly (it doesn't match the :placeholder-shown pseudo-class and it
should). It was introduced in bug 807613 and never turned to false by
default. I suspect nobody will miss this, but if somebody complains
about it we can reintroduce it properly (handling the pref in DOM
instead, changing the right state bits).

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d989f71f0a41
Manage placeholder and autofill preview visibility using CSS rather than custom code. r=masayuki
Severity: -- → N/A
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Regressions: 1722662
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: