Closed Bug 1521212 Opened 2 years ago Closed 2 years ago

date and time inputs with value and styled visibility:hidden still show (x) to clear

Categories

(Core :: Layout: Form Controls, defect)

64 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: curtis, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

Render date or time inputs styled visibility:hidden and notice the lingering (x) icons.

Repro example:
<!doctype html>
<div><label>Visible date input <input type="date" value="2019-01-18"></label></div>
<div><label>Hidden date input <input type="date" value="2019-01-18" style="visibility:hidden"></label></div>
<div><label>Visible time input <input type="time" value="16:30"></label></div>
<div><label>Hidden time input <input type="time" value="16:30" style="visibility:hidden"></label></div>

Actual results:

The hidden (visibility:hidden) date and time inputs hide but their (x) clear buttons remain visible.

Expected results:

The entire input, including any native interface elements of the input, should be invisible.

Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Form Controls
Ever confirmed: true
Product: Firefox → Core
See Also: → 1478654

This one is a very easy bug to fix, nice catch :)

Assignee: nobody → emilio

CSS visibility doesn't work like display. visibility: visible elements in a
visibility: hidden subtree still get shown.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc8020199c4b
Unset visibility of the reset button instead of setting it to visible. r=Gijs
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Duplicate of this bug: 1464760
You need to log in before you can comment on or make changes to this bug.