Bug 1045000, don't set the previously focused element to a window, which can later cause the window to focus and bring itself to the front when the panel closes, r=dao

This commit is contained in:
Neil Deakin 2014-08-19 20:01:41 -04:00
parent 79a504dc25
commit b41e31f71f

View File

@ -262,11 +262,11 @@
// Capture the previous focus before has a chance to get set inside the panel
try {
this._prevFocus = document.commandDispatcher.focusedElement;
if (!this._prevFocus) // Content window has focus
this._prevFocus = document.commandDispatcher.focusedWindow;
} catch (ex) {
this._prevFocus = document.activeElement;
}
if (this._prevFocus)
return;
} catch (ex) { }
this._prevFocus = document.activeElement;
]]></handler>
<handler event="popupshown"><![CDATA[
// Fire event for accessibility APIs