Closed Bug 1332340 Opened 3 years ago Closed 3 years ago

Cannot Close Event Window Once Thunderbird Closes [TypeError: document.getElementById(...).ensureCalendarVisible is not a function]

Categories

(Calendar :: Dialogs, defect)

Lightning 5.5
x86_64
Windows 10
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: shawnmsrm, Assigned: pmorris)

Details

Attachments

(1 file)

I had Thunderbird running and also had an Event window open (creating a new event). I then closed Thunderbird but the Event window was still open. I tried to click on "Save and Close" in the event window but nothing happened. The window would not close. I had to use the "X" in the top right to close the event window.
Summary: Event Cannot Close Dialog Window → Events - Cannot Close Event Window Once Thunderbird Closes
Product: Thunderbird → Calendar
Version: 53 Branch → Lightning 5.5
I can confirm. Clicking Save or Save&Close button reports the following error message in Error Console:

> TypeError: document.getElementById(...).ensureCalendarVisible is not a function
>     ensureCalendarVisible chrome://calendar/content/calendar-management.js:294:5
>     doTransaction chrome://calendar/content/calendar-item-editing.js:629:5
>     onNewEvent chrome://calendar/content/calendar-item-editing.js:237:13
>     onCommandSave chrome://lightning/content/lightning-item-iframe.js:3031:5
>     onAccept chrome://lightning/content/lightning-item-iframe.js:430:5
>     receiveMessage chrome://lightning/content/lightning-item-iframe.js:192:26

Error location: https://dxr.mozilla.org/comm-central/source/calendar/base/content/calendar-management.js#294
Maybe it would be sufficient to add a check if document.getElementById("calendar-list-tree-widget") found the element or not.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → Dialogs
Summary: Events - Cannot Close Event Window Once Thunderbird Closes → Cannot Close Event Window Once Thunderbird Closes [TypeError: document.getElementById(...).ensureCalendarVisible is not a function]
Paul, can you please take a look at this?
Flags: needinfo?(paulmorriss)
Sorry Paul, I accidentally missed to NI the right PM. So, next try ;-)
Flags: needinfo?(paulmorriss) → needinfo?(paul)
Yeah, I can take a look when I get a chance.
Assignee: nobody → paul
Flags: needinfo?(paul)
This patch fixes this bug, allowing the dialog window to be saved and closed, e.g. with 'save' and 'save and close' buttons.

With this patch the following error appears in the console, once for cmd_undo and once for cmd_redo.  Not sure if it is worth addressing this in this bug or not.

An error occurred updating the cmd_redo command: TypeError: top is null  globalOverlay.js:83
	goUpdateCommand chrome://global/content/globalOverlay.js:83:5
	updateUndoRedoMenu chrome://calendar/content/calendar-item-editing.js:698:5
	doTransaction chrome://calendar/content/calendar-item-editing.js:637:5
	onModifyItem chrome://calendar/content/calendar-item-editing.js:352:9
	onCommandSave chrome://lightning/content/lightning-item-iframe.js:3031:5
	onAccept chrome://lightning/content/lightning-item-iframe.js:430:5
	receiveMessage chrome://lightning/content/lightning-item-iframe.js:192:26
Attachment #8833075 - Flags: review?(makemyday)
Comment on attachment 8833075 [details] [diff] [review]
calendarBug1332340.patch

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

Thanks, r=me.

Can you file a separate bug for the undo/redo issue and take a look at it?
Attachment #8833075 - Flags: review?(makemyday)
Attachment #8833075 - Flags: review+
Attachment #8833075 - Flags: approval-calendar-beta?(philipp)
Attachment #8833075 - Flags: approval-calendar-aurora?(philipp)
OK, thanks, I've filed a new bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1337120
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/e00f019317f5bb73702c5f54d28b8b84a2ca78e5
(Can I be very picky: The commit message With All Word In Uppercase looks funny)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 5.6
(In reply to Jorg K (GMT+1) from comment #8)
> https://hg.mozilla.org/comm-central/rev/
> e00f019317f5bb73702c5f54d28b8b84a2ca78e5
> (Can I be very picky: The commit message With All Word In Uppercase looks
> funny)

Ah, I just copied and pasted from the bug title, but you're right it does look funny.
Attachment #8833075 - Flags: approval-calendar-beta?(philipp)
Attachment #8833075 - Flags: approval-calendar-beta+
Attachment #8833075 - Flags: approval-calendar-aurora?(philipp)
Attachment #8833075 - Flags: approval-calendar-aurora+
You need to log in before you can comment on or make changes to this bug.