Bug 515635 - "Search Google for ..." context menu should open tab next to current active tab. r=dao
authorJohn Morkel <jmorkel@gmail.com>
Wed, 16 Sep 2009 19:36:38 +0200
changeset 33127 14afe468a9a31e7b3ce7e2688825cf0aa0e953b2
parent 33126 c995745f3604371168d437dc786558f4d12d493b
child 33128 9a9e3daf759ca592d73703c747adab9a590c8a69
push id798
push userdgottwald@mozilla.com
push dateTue, 24 Nov 2009 20:42:48 +0000
reviewersdao
bugs515635
milestone1.9.2b4pre
Bug 515635 - "Search Google for ..." context menu should open tab next to current active tab. r=dao
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3161,18 +3161,19 @@ const BrowserSearch = {
     // getSubmission can return null if the engine doesn't have a URL
     // with a text/html response type.  This is unlikely (since
     // SearchService._addEngineToStore() should fail for such an engine),
     // but let's be on the safe side.
     if (!submission)
       return;
   
     if (useNewTab) {
-      gBrowser.loadOneTab(submission.uri.spec, null, null,
-                          submission.postData, null, false);
+      gBrowser.loadOneTab(submission.uri.spec, {
+                          postData: submission.postData,
+                          relatedToCurrent: true});
     } else
       loadURI(submission.uri.spec, null, submission.postData, false);
   },
 
   /**
    * Returns the search bar element if it is present in the toolbar, null otherwise.
    */
   get searchBar() {