Bug 1159688 - After switching the window layout, dragging the splitter between threadpane and messagepane shouldn't create gray area (misplaced notificationbox). r=mkmelin
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 29 Apr 2015 15:39:52 +0200
changeset 22542 c18d41881e40c7917814078562bf7d828c4a4d93
parent 22541 6d44313309e36962afd447b9f3a47b6b1b02424b
child 22543 6e421c79d586fb1aef003c91c67fe2b9de38a76f
push id1420
push usermbanner@mozilla.com
push dateMon, 29 Jun 2015 20:47:24 +0000
treeherdercomm-beta@b3db00bb24e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1159688
Bug 1159688 - After switching the window layout, dragging the splitter between threadpane and messagepane shouldn't create gray area (misplaced notificationbox). r=mkmelin
mail/base/content/msgMail3PaneWindow.js
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -275,18 +275,24 @@ function UpdateMailPaneConfig(aMsgWindow
       cloneToolbarset = hdrToolbox.toolbarset.cloneNode(true);
     }
 
     // See Bug 381992. The ctor for the browser element will fire again when we
     // re-insert the messagePaneBoxWrapper back into the document.  But the dtor
     // doesn't fire when the element is removed from the document.  Manually
     // call destroy here to avoid a nasty leak.
     document.getElementById("messagepane").destroy();
-    desiredParent.appendChild(messagePaneSplitter);
-    desiredParent.appendChild(messagePaneBoxWrapper);
+    let footerBox = desiredParent.lastChild;
+    if (footerBox && footerBox.id == "msg-footer-notification-box") {
+      desiredParent.insertBefore(messagePaneSplitter, footerBox);
+      desiredParent.insertBefore(messagePaneBoxWrapper, footerBox);
+    } else {
+      desiredParent.appendChild(messagePaneSplitter);
+      desiredParent.appendChild(messagePaneBoxWrapper);
+    }
     hdrToolbox.palette  = cloneToolboxPalette;
     hdrToolbox.toolbarset = cloneToolbarset;
     hdrToolbar = document.getElementById("header-view-toolbar");
     hdrToolbar.firstPermanentChild = firstPermanentChild;
     hdrToolbar.lastPermanentChild = lastPermanentChild;
     messagePaneSplitter.orient = desiredParent.orient;
     if (aMsgWindowInitialized)
     {