Closed
Bug 1371911
Opened 8 years ago
Closed 8 years ago
JS errors when AppMenu is not on toolbar
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 55.0
People
(Reporter: Paenglab, Assigned: Paenglab)
References
Details
Attachments
(1 file, 1 obsolete file)
|
2.68 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
I get JS errors when the Appmenu isn't in the toolbar when I open the view menu or I change to offline mode.
| Assignee | ||
Comment 1•8 years ago
|
||
Check first if the item exists.
Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #8876380 -
Flags: review?(acelists)
Comment on attachment 8876380 [details] [diff] [review]
noAppMenuErrors.patch
Review of attachment 8876380 [details] [diff] [review]:
-----------------------------------------------------------------
::: mail/base/content/mail-offline.js
@@ +203,5 @@
> */
> updateOfflineUI: function(aIsOffline)
> {
> document.getElementById('goOfflineMenuItem').setAttribute("checked", aIsOffline);
> + if (document.getElementById('appmenu_goOffline'))
Please use double quotes for the strings.
::: mail/base/content/mailWindowOverlay.js
@@ +191,5 @@
> messagePaneMenuItem.disabled = accountCentralDisplayed;
> }
>
> + if (document.getElementById("appmenu_showMessage")) {
> + let messagePaneAppMenuItem = document.getElementById("appmenu_showMessage");
Please swap it like:
let messagePaneAppMenuItem = document.getElementById("appmenu_showMessage");
if (messagePaneAppMenuItem && messagePaneAppMenuItem.hidden) ..
@@ +204,5 @@
> if (!folderPaneMenuItem.hidden) { // Hidden in the standalone msg window.
> folderPaneMenuItem.setAttribute("checked", gFolderDisplay.folderPaneVisible);
> }
>
> let folderPaneAppMenuItem = document.getElementById("appmenu_showFolderPane");
Doesn't this one and other appmenu_* elements below need to be checked for existence too?
| Assignee | ||
Comment 3•8 years ago
|
||
(In reply to :aceman from comment #2)
> Comment on attachment 8876380 [details] [diff] [review]
> noAppMenuErrors.patch
>
> Review of attachment 8876380 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mail/base/content/mail-offline.js
> @@ +203,5 @@
> > */
> > updateOfflineUI: function(aIsOffline)
> > {
> > document.getElementById('goOfflineMenuItem').setAttribute("checked", aIsOffline);
> > + if (document.getElementById('appmenu_goOffline'))
>
> Please use double quotes for the strings.
mail-offline.js has a mixture of using single- and double quotes. I changed now the whole function block to double quotes.
> ::: mail/base/content/mailWindowOverlay.js
> @@ +191,5 @@
> > messagePaneMenuItem.disabled = accountCentralDisplayed;
> > }
> >
> > + if (document.getElementById("appmenu_showMessage")) {
> > + let messagePaneAppMenuItem = document.getElementById("appmenu_showMessage");
>
> Please swap it like:
> let messagePaneAppMenuItem = document.getElementById("appmenu_showMessage");
> if (messagePaneAppMenuItem && messagePaneAppMenuItem.hidden) ..
Done.
> @@ +204,5 @@
> > if (!folderPaneMenuItem.hidden) { // Hidden in the standalone msg window.
> > folderPaneMenuItem.setAttribute("checked", gFolderDisplay.folderPaneVisible);
> > }
> >
> > let folderPaneAppMenuItem = document.getElementById("appmenu_showFolderPane");
>
> Doesn't this one and other appmenu_* elements below need to be checked for
> existence too?
I checked all menus and got no additional errors.
Attachment #8876380 -
Attachment is obsolete: true
Attachment #8876380 -
Flags: review?(acelists)
Attachment #8876393 -
Flags: review?(acelists)
Comment on attachment 8876393 [details] [diff] [review]
noAppMenuErrors.patch
Review of attachment 8876393 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks.
Attachment #8876393 -
Flags: review?(acelists) → review+
Comment 6•8 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 55.0
You need to log in
before you can comment on or make changes to this bug.
Description
•