Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Regression from Bug 824150: toolbox has no method getElementById()

RESOLVED FIXED in Thunderbird 23.0


Toolbars and Tabs
4 years ago
4 years ago


(Reporter: alta88, Assigned: aryx)



22 Branch
Thunderbird 23.0

Thunderbird Tracking Flags

(thunderbird22+ fixed)



(1 attachment, 1 obsolete attachment)



4 years ago
there's no getElementById on an element (toolbox) so this is throwing, maybe even preventing the after customize event..

diff --git a/mail/base/content/mailCore.js b/mail/base/content/mailCore.js
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -204,28 +204,28 @@ function MailToolboxCustomizeDone(aEvent
   var customizePopup = document.getElementById(customizePopupId);
   // make sure our toolbar buttons have the correct enabled state restored to them...
   if (this.UpdateMailToolbar != undefined)
-  var toolbox = document.getElementsByAttribute("doCustomization", "true")[0];
+  let toolbox = document.querySelector('[doCustomization="true"]');
   if (toolbox) {
     // The GetMail button is stuck in a strange state right now, since the
     // customization wrapping preserves its children, but not its initialized
     // state. Fix that here.
     // Fix Bug 565045: Only treat "Get Message Button" if it is in our toolbox
-    var popup = toolbox.getElementsByAttribute("id", "button-getMsgPopup")[0];
+    let popup = toolbox.getElementById("button-getMsgPopup");
     if (popup) {
       // We can't use _teardown here, because it'll remove the Get All menuitem
-      let sep = toolbox.getElementsByAttribute("id", "button-getAllNewMsgSeparator")[0];
+      let sep = toolbox.getElementById("button-getAllNewMsgSeparator");
       while (popup.lastChild != sep)

Comment 1

4 years ago
Thanks for catching this.
The original getElementsByAttribute is a method of toolbox, so the change just needs to be reverted (maybe a comment added).
Assignee: nobody → archaeopteryx
Version: unspecified → 22


4 years ago
Summary: Regression from Bug 824150 → Regression from Bug 824150: toolbox has no method getElementById()
Created attachment 735673 [details] [diff] [review]
patch, v1

Now using querySelector.
Attachment #735673 - Flags: review?(mbanner)

Comment 3

4 years ago
Aryx, can you try if the patch also fixes bug 859287?
Duplicate of this bug: 859287
It also fixes bug 859287, sorry for the regression.
(In reply to Archaeopteryx [:aryx] from comment #5)
> It also fixes bug 859287, sorry for the regression.

Nope. It does not fix bug 859287. So it is not a regression. Or at least not the entire reason.

Comment 7

4 years ago
Comment on attachment 735673 [details] [diff] [review]
patch, v1

Maybe mconley could look at this simple thing faster.
Attachment #735673 - Flags: review?(mconley)


4 years ago
Component: Mail Window Front End → Toolbars and Tabs
Comment on attachment 735673 [details] [diff] [review]
patch, v1

Definitely yes. r=me, no need to bother Mark with this one.
Attachment #735673 - Flags: review?(mconley)
Attachment #735673 - Flags: review?(mbanner)
Attachment #735673 - Flags: review+
tracking-thunderbird22: --- → ?
Created attachment 737174 [details] [diff] [review]
patch, v2, r=mconley
Attachment #735673 - Attachment is obsolete: true
Keywords: checkin-needed
Whiteboard: [leave open for aurora][push to comm-central]

Standard practice throughout the project is to resolve bugs when they hit {comm,mozilla}-central and use the status flags for tracking branch uplifts. Please put checkin-needed back on the bug when it gets approval for aurora uplift.
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [leave open for aurora][push to comm-central]
Target Milestone: --- → Thunderbird 23.0
Comment on attachment 737174 [details] [diff] [review]
patch, v2, r=mconley

[Triage Comment]
If the patch is ready, and you want to push this to aurora (or other branch) the correct way is to signal approval-comm-<branch> (set to ?) on the patch.

Then we can come along a approve it. a=me since this is a low risk fix for a regression.
Attachment #737174 - Flags: approval-comm-aurora+
tracking-thunderbird22: ? → +
status-thunderbird22: --- → fixed
You need to log in before you can comment on or make changes to this bug.