Bug 823325 - Use timeout before calling browser.focus(). r=mfinkle

This commit is contained in:
Brian Nicholson 2013-01-02 15:05:21 -08:00
parent 07f3675849
commit 5f0fc6b767

View File

@ -2808,8 +2808,13 @@ Tab.prototype = {
if (aActive) {
this.browser.setAttribute("type", "content-primary");
this.browser.focus();
this.browser.docShellIsActive = true;
// setTimeout() is needed to make sure the browser is visible before it
// is focused (see bug 823325).
setTimeout(function () {
this.browser.focus();
}.bind(this), 0);
} else {
this.browser.setAttribute("type", "content-targetable");
this.browser.docShellIsActive = false;