1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-09 13:35:47 +01:00

Fix bluring certain editable iframes.

This commit is contained in:
Kris Maglione
2011-02-24 17:05:56 -05:00
parent 186a3438ac
commit 8d693c5d03

View File

@@ -483,10 +483,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
try {
if (elem instanceof Document)
elem = elem.defaultView;
if (elem instanceof Window)
services.focus.focusedWindow = elem;
else
if (elem instanceof Element)
services.focus.setFocus(elem, flags);
else if (elem instanceof Window)
services.focus.focusedWindow = elem;
}
catch (e) {
util.dump(elem);
@@ -531,6 +531,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
this.ignoreFocus = true;
if (win.frameElement)
win.frameElement.blur();
// Grr.
if (content.document.activeElement instanceof HTMLIFrameElement)
content.document.activeElement.blur();
});
}
}