Closed Bug 1615453 Opened 2 months ago Closed 1 month ago

The UI in a Calendar or Task tab is broken if that tab is focused on startup

Categories

(Calendar :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmorris, Assigned: pmorris)

References

(Blocks 2 open bugs, Regression)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch cal-tab-focused-startup-0.patch (obsolete) — Splinter Review

If you close and re-open the tab everything is fine. If you switch to another tab and then back, things are fine except for the tab's icon and title in the tab bar.

Looking closer, this is caused by a load order issue where TodayPane.updateDisplay gets called before TodayPane.onLoad, and so TodayPane.paneViews is still null.

The attached patch improves things but does not fully solve them. With the patch only the left hand sidebar (with the minimonth etc.) is blank rather than the whole tab's UI being off.

I've looked briefly at an approach of calling TodayPane.onLoad if needed when TodayPane.updateDisplay is called, but onLoad is async and updateDisplay is not. So you end up having a domino effect of switching functions from sync to async.

I also tried calling ltnOnLoad near the top of OnLoadMessenger, but that did not fix the problem.

This fixes the problem by loading the calendar component right before any tabs are restored.

Try run just started: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=8363172ebded7dff562e1610b6708a6c773187c9

Attachment #9126582 - Attachment is obsolete: true
Attachment #9126765 - Flags: review?(philipp)
Attachment #9126765 - Flags: review?(geoff)
Blocks: 1614194

Try run looks good. The linting error is not from this patch (as you can see here).

Status: NEW → ASSIGNED
Product: Thunderbird → Calendar
Attachment #9126765 - Flags: approval-calendar-beta?(philipp)
Attachment #9126765 - Flags: review?(philipp)
Attachment #9126765 - Flags: review?(geoff)
Attachment #9126765 - Flags: review+
Attachment #9126765 - Flags: approval-calendar-beta?(philipp)
Attachment #9126765 - Flags: approval-calendar-beta+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/c43ae2963d75
Fix calendar tabs when they are focused at startup. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 75
Target Milestone: 75 → 74
Duplicate of this bug: 1616919
You need to log in before you can comment on or make changes to this bug.