mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-27 23:33:32 +01:00
Fix bluring certain editable iframes.
This commit is contained in:
@@ -483,10 +483,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
try {
|
try {
|
||||||
if (elem instanceof Document)
|
if (elem instanceof Document)
|
||||||
elem = elem.defaultView;
|
elem = elem.defaultView;
|
||||||
if (elem instanceof Window)
|
if (elem instanceof Element)
|
||||||
services.focus.focusedWindow = elem;
|
|
||||||
else
|
|
||||||
services.focus.setFocus(elem, flags);
|
services.focus.setFocus(elem, flags);
|
||||||
|
else if (elem instanceof Window)
|
||||||
|
services.focus.focusedWindow = elem;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
util.dump(elem);
|
util.dump(elem);
|
||||||
@@ -531,6 +531,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
this.ignoreFocus = true;
|
this.ignoreFocus = true;
|
||||||
if (win.frameElement)
|
if (win.frameElement)
|
||||||
win.frameElement.blur();
|
win.frameElement.blur();
|
||||||
|
// Grr.
|
||||||
|
if (content.document.activeElement instanceof HTMLIFrameElement)
|
||||||
|
content.document.activeElement.blur();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user