Closed Bug 1131052 Opened 5 years ago Closed 5 years ago

Datepicker month is not initialized properly

Categories

(Toolkit :: XUL Widgets, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: enndeakin, Assigned: enndeakin)

Details

(Keywords: regression)

Attachments

(1 file)

Attached patch datemonthSplinter Review
This is a regression from bug 1009628. Now that it adjusts the selected index when the child frame in a deck is removed, the deck children in the datepicker are getting recreated when their attributes are set.

(The deck code should probably only adjust the index when the content is actually going away, but I don't think we can determine that.)
Attachment #8561385 - Flags: review?(neil)
Aha, so what you're saying is that setting the value attribute reconstructs the label's frame thus confusing the deck layout code?
Yes.
That does feel a little hacky to me... do we only adjust the selected index when we remove deck children, not when we insert them? (Should we?)
We don't, but we should I think. Perhaps we shouldn't use the index and instead use a node or something. Requires more thought but that's a separate bug.
Comment on attachment 8561385 [details] [diff] [review]
datemonth

OK, r=me if you think about it in a separate bug.
Attachment #8561385 - Flags: review?(neil) → review+
I file bug 1132449.
https://hg.mozilla.org/mozilla-central/rev/f235e9568add
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.