Bug 416710 - "When opening a tab in the foreground, we set selectedTab twice" [p=dao@mozilla.com (Dão Gottwald) r=gavin a1.9=schrep]

This commit is contained in:
reed@reedloden.com 2008-02-13 02:21:54 -08:00
Родитель 309b9b2816
Коммит 943b8ce48e
1 изменённых файлов: 1 добавлений и 9 удалений

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

@ -1018,17 +1018,9 @@
var owner = bgLoad ? null : this.selectedTab;
var tab = this.addTab(aURI, aReferrerURI, aCharset, aPostData, owner,
aAllowThirdPartyFixup);
// Set newly selected tab after quick timeout, otherwise hideous focus problems
// can occur when "browser.tabs.loadInBackground" is false and presshell is not ready
if (!bgLoad) {
function selectNewForegroundTab(browser, tab) {
browser.selectedTab = tab;
}
setTimeout(selectNewForegroundTab, 0, getBrowser(), tab);
}
if (!bgLoad)
this.selectedTab = tab;
return tab;
]]>
</body>