Closed Bug 1371111 Opened 5 years ago Closed 5 years ago

Clicking input[type=date] padding does not open the chooser

Categories

(Core :: Layout: Form Controls, defect, P2)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jtojnar, Assigned: jessica)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached image Areas of the date input
How to reproduce:
Click on the padding area of an input[type=date] (highlighted blue in the attached image).

What should happen:
First subfield should be selected and date chooser should be opened, just like when clicking the empty part of the content box (highlighted red).

What is happening:
First subfield (month) is selected.
[triage]
P2.
Priority: -- → P2
Attached patch patch, v1. (obsolete) — Splinter Review
Hi Mike, could you take a look at this tiny patch? :)
Assignee: nobody → jjong
Attachment #8897693 - Flags: review?(mconley)
Comment on attachment 8897693 [details] [diff] [review]
patch, v1.

Review of attachment 8897693 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! This looks good, but I have some minor questions - see below.

-'ing until I hear back.

::: toolkit/content/widgets/datetimebox.xml
@@ +1236,5 @@
>            mozSystemGroup: true
>          });
> +        // This is to open the picker when input element's padding area is
> +        // clicked.
> +        this.mInputElement.addEventListener("click", this,

Should we be removing this (and the blur listener) in the destructor?

Also, since we're listening to the "click" event here, can we safely remove "click" from EVENTS?
Attachment #8897693 - Flags: review?(mconley) → review-
(In reply to Mike Conley (:mconley) from comment #3)
> Comment on attachment 8897693 [details] [diff] [review]
> patch, v1.
> 
> Review of attachment 8897693 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Thanks! This looks good, but I have some minor questions - see below.
> 
> -'ing until I hear back.
> 
> ::: toolkit/content/widgets/datetimebox.xml
> @@ +1236,5 @@
> >            mozSystemGroup: true
> >          });
> > +        // This is to open the picker when input element's padding area is
> > +        // clicked.
> > +        this.mInputElement.addEventListener("click", this,
> 
> Should we be removing this (and the blur listener) in the destructor?

Yes, how did I forget about them. :/

> 
> Also, since we're listening to the "click" event here, can we safely remove
> "click" from EVENTS?

Yes, we can, since the click event on the xul element eventually bubbles up to the input element. Thanks for the suggestion.
Attached patch patch, v2.Splinter Review
Addressed review comment 3.
Attachment #8897693 - Attachment is obsolete: true
Attachment #8898593 - Flags: review?(mconley)
Comment on attachment 8898593 [details] [diff] [review]
patch, v2.

Review of attachment 8898593 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8898593 - Flags: review?(mconley) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fecc3b17395a
Open picker when input element's padding area is clicked. r=mconley
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fecc3b17395a
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.