mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 11:27:58 +01:00
Fix issue #18
This commit is contained in:
@@ -824,8 +824,8 @@ const liberator = (function () //{{{
|
|||||||
{
|
{
|
||||||
let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher);
|
.getService(Components.interfaces.nsIWindowWatcher);
|
||||||
if (window == ww.activeWindow && document.commandDispatcher.focusedElement && clearFocusedElement)
|
if (window != ww.activeWindow)
|
||||||
document.commandDispatcher.focusedElement.blur();
|
return;
|
||||||
|
|
||||||
// TODO: make more generic
|
// TODO: make more generic
|
||||||
try
|
try
|
||||||
@@ -847,6 +847,8 @@ const liberator = (function () //{{{
|
|||||||
if (frame && frame.top == window.content)
|
if (frame && frame.top == window.content)
|
||||||
elem = frame;
|
elem = frame;
|
||||||
}
|
}
|
||||||
|
if (clearFocusedElement && document.commandDispatcher.focusedElement)
|
||||||
|
document.commandDispatcher.focusedElement.blur();
|
||||||
if (elem && (elem != document.commandDispatcher.focusedElement))
|
if (elem && (elem != document.commandDispatcher.focusedElement))
|
||||||
elem.focus();
|
elem.focus();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user