Bug 1497093 - Remove the duplicate content of findbar. r=mkmelin
authorArshad Khan <arshdkhn1@gmail.com>
Tue, 09 Oct 2018 02:08:29 +0530
changeset 33356 283c828650e3acf302b844263cedb609b2a88cb7
parent 33355 1bffb3f6d7a9634e803aa28dd85c57dc36f00cef
child 33357 22016492fb10c5d1b4175047c095d935c19de151
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersmkmelin
bugs1497093
Bug 1497093 - Remove the duplicate content of findbar. r=mkmelin
mail/base/content/messenger.xul
mail/base/content/specialTabs.js
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -669,17 +669,16 @@
           <toolbar id="dummycontenttoolbar" class="contentTabToolbar">
           </toolbar>
         </toolbox>
         <notificationbox flex="1" notificationside="top">
           <browser id="dummycontentbrowser" type="content" flex="1"
                    disablehistory="true" autocompletepopup="PopupAutoComplete"
                    context="mailContext"/>
         </notificationbox>
-        <findbar browserid="dummycontentbrowser"/>
       </vbox>
     </vbox>
 
     <vbox id="chromeTab" collapsed="true">
       <vbox flex="1" class="chromeTabInstance">
         <toolbox id="dummychrometoolbox" class="contentTabToolbox">
           <toolbar id="dummychrometoolbar" class="contentTabToolbar"></toolbar>
         </toolbox>
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -689,16 +689,22 @@ var specialTabs = {
      */
     openTab: function contentTab_onTabOpened(aTab, aArgs) {
       if (!"contentPage" in aArgs)
         throw("contentPage must be specified");
 
       // First clone the page and set up the basics.
       let clone = document.getElementById("contentTab").firstChild.cloneNode(true);
 
+      const findbar = document.createElement("findbar");
+      // Adding browserid to findbar so that browser property can be set
+      // in findbar custom element.
+      findbar.setAttribute("browserid", "dummycontentbrowser");
+      clone.appendChild(findbar);
+
       clone.setAttribute("id", "contentTab" + this.lastBrowserId);
       clone.setAttribute("collapsed", false);
 
       let toolbox = clone.firstChild;
       toolbox.setAttribute("id", "contentTabToolbox" + this.lastBrowserId);
       toolbox.firstChild.setAttribute("id", "contentTabToolbar" + this.lastBrowserId);
 
       aTab.panel.setAttribute("id", "contentTabWrapper" + this.lastBrowserId);