Bug 311607: "Select new tabs opened from links" pref isn't obeyed for links dragged to existing tabs, r=mano

This commit is contained in:
gavin%gavinsharp.com 2005-10-09 02:29:49 +00:00
Родитель 48c4228001
Коммит 11c4d8e7f9
1 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -1536,23 +1536,26 @@
this.dragDropSecurityCheck(aEvent, aDragSession, url);
var bgLoad = true;
try {
bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground");
}
catch (e) { }
if (aEvent.shiftKey)
bgLoad = !bgLoad;
if (aEvent.originalTarget.localName != "tab") {
// We're adding a new tab.
var bgLoad = true;
try {
bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground");
}
catch (e) { }
if (aEvent.shiftKey)
bgLoad = !bgLoad;
this.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad);
}
else {
// Load in an existing tab.
var tab = aEvent.originalTarget;
this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url));
if (this.mCurrentTab != tab && !bgLoad)
this.selectedTab = tab;
}
}
]]>