Port bug 543435: Make initial about:blank loading into iframe not get overwritten … (Follow-up)
Categories
(Thunderbird :: Upstream Synchronization, defect)
Tracking
(Not tracked)
People
(Reporter: welpy-cw, Assigned: welpy-cw)
References
Details
(Keywords: regression)
Attachments
(1 external file)
There are several place in the code relying solely on Document.readyState which may cause problems after bug 543435. See for example this case with the following STR:
- Open a message in a standalone window.
- Close the 3-pane window.
- 'Tools' -> 'Address Book' (Ctrl-Shift-B)
After step 3, a new 3-pane window is being opened, but the address book tab is not, instead
Uncaught (in promise) TypeError: can't access property "globalOverlay", messengerWindow.tabmail is undefined
toAddressBook chrome://messenger/content/mailCore.js:455
oncommand chrome://messenger/content/messageWindow.xhtml:1
is displayed in the error console.
I am not sure if bug 2003514 would have an impact on this again, so for now I suggest the following patch. As mentioned, there are several other places we might want to check, see this Searchfox query.
| Assignee | ||
Comment 1•9 months ago
|
||
Due to the changes in Bug 543435 (Synchronous about:blank), the initial empty
document is now created synchronously. This results in document.readyState
being "complete" immediately upon window creation.
Consequently, the checks in toAddressBook, toCalendar, and toImport were
passing prematurely, attempting to open tabs on the transient initial document
before the actual Mail UI was fully restored.
This patch adds a check for document.isUncommittedInitialDocument. If true,
the code will now correctly wait for the mail-tabs-session-restored
notification before attempting to interact with the window.
Updated•9 months ago
|
Updated•9 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Updated•9 months ago
|
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/eef133129e0a
Centralize messenger window opening and wait for initial document commit. r=darktrojan
Description
•