Bug 727131: add pref to control whether searches from the context menu open in the background, r=dao

This commit is contained in:
Gavin Sharp 2012-02-14 17:50:40 -08:00
parent ee7d02bb70
commit 343141a53f
2 changed files with 5 additions and 1 deletions

View File

@ -357,6 +357,9 @@ pref("browser.search.order.3", "chrome://browser-region/locale/re
// search bar results always open in a new tab
pref("browser.search.openintab", false);
// context menu searches open in the foreground
pref("browser.search.context.loadInBackground", false);
// send ping to the server to update
pref("browser.search.update", true);

View File

@ -3555,10 +3555,11 @@ const BrowserSearch = {
if (!submission)
return;
let inBackground = Services.prefs.getBoolPref("browser.search.context.loadInBackground");
openLinkIn(submission.uri.spec,
useNewTab ? "tab" : "current",
{ postData: submission.postData,
inBackground: false,
inBackground: inBackground,
relatedToCurrent: true });
},