mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-01 09:49:26 +00:00
[minor fix] If the master password is set, sometimes throws an error
This commit is contained in:
@@ -262,12 +262,13 @@
|
||||
<handler event="popupshowing"><![CDATA[
|
||||
// Capture the previous focus before has a chance to get set inside the panel
|
||||
try {
|
||||
this._prevFocus = document.commandDispatcher.focusedElement;
|
||||
if (this._prevFocus)
|
||||
this._prevFocus = Components.utils
|
||||
.getWeakReference(document.commandDispatcher.focusedElement);
|
||||
if (this._prevFocus.get())
|
||||
return;
|
||||
} catch (ex) { }
|
||||
|
||||
this._prevFocus = document.activeElement;
|
||||
this._prevFocus = Components.utils.getWeakReference(document.activeElement);
|
||||
]]></handler>
|
||||
<handler event="popupshown"><![CDATA[
|
||||
// Fire event for accessibility APIs
|
||||
@@ -284,7 +285,7 @@
|
||||
]]></handler>
|
||||
<handler event="popuphidden"><![CDATA[
|
||||
var currentFocus = this._currentFocus;
|
||||
var prevFocus = this._prevFocus;
|
||||
var prevFocus = this._prevFocus ? this._prevFocus.get() : null;
|
||||
this._currentFocus = null;
|
||||
this._prevFocus = null;
|
||||
if (prevFocus && currentFocus && this.getAttribute("norestorefocus") != "true") {
|
||||
|
||||
Reference in New Issue
Block a user