Bug 545420 - E-mails found with advanced search cannot be opened by double click [RestoreSelectionWithoutContentLoad is not defined]. r+moa=Mnyromyr
authorJens Hatlak <jh@junetz.de>
Mon, 20 Dec 2010 18:19:42 +0100
changeset 6864 beb0459250df80ab6fa25ee5ebb81342fe5cb304
parent 6863 e65a8ebcdfc2bc749abff80d8c581f94ac528ec5
child 6865 8bbeb8adbfca4876f5e8885f56f787765d6471ed
push idunknown
push userunknown
push dateunknown
bugs545420
Bug 545420 - E-mails found with advanced search cannot be opened by double click [RestoreSelectionWithoutContentLoad is not defined]. r+moa=Mnyromyr
suite/mailnews/threadPane.js
--- a/suite/mailnews/threadPane.js
+++ b/suite/mailnews/threadPane.js
@@ -46,17 +46,17 @@ function ThreadPaneOnClick(event)
   let t = event.originalTarget;
 
   // we may want to open the message in a new tab on middle click
   if (event.button == kMouseButtonMiddle)
   {
     if (t.localName == "treechildren" && AllowOpenTabOnMiddleClick())
     {
       // we don't allow new tabs in the search dialog
-      if ("RestoreSelectionWithoutContentLoad" in window)
+      if (document.documentElement.id != "searchMailWindow")
       {
         MsgOpenNewTabForMessage();
         RestoreSelectionWithoutContentLoad(GetThreadTree());
       }
       return;
     }
   }
 
@@ -223,18 +223,19 @@ function ThreadPaneDoubleClick()
   else if(IsSpecialFolderSelected(nsMsgFolderFlags.Templates, true))
   {
     var loadedFolder = GetLoadedMsgFolder();
     var messageArray = GetSelectedMessages();
     ComposeMessage(Components.interfaces.nsIMsgCompType.Template,
                    Components.interfaces.nsIMsgCompFormat.Default,
                    loadedFolder, messageArray);
   }
-  else if (AllowOpenTabOnDoubleClick())
-  {
+  else if (AllowOpenTabOnDoubleClick() &&
+           document.documentElement.id != "searchMailWindow")
+  {        // we don't allow new tabs in the search dialog
     // open the message in a new tab on double click
     MsgOpenNewTabForMessage();
     RestoreSelectionWithoutContentLoad(GetThreadTree());
   }
   else
   {
     MsgOpenSelectedMessages();
   }