1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-06 08:35:45 +01:00

Fix bluring editible windows, I hope.

This commit is contained in:
Kris Maglione
2011-02-24 16:50:55 -05:00
parent 4b4b735485
commit 186a3438ac
2 changed files with 7 additions and 3 deletions

View File

@@ -527,9 +527,11 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (dactyl.focusedElement)
dactyl.focusedElement.blur();
if (win && Editor.getEditor(win)) {
win.blur();
if (win.frameElement && false)
win.frameElement.blur();
this.withSavedValues(["ignoreFocus"], function _focusContent() {
this.ignoreFocus = true;
if (win.frameElement)
win.frameElement.blur();
});
}
}

View File

@@ -1340,6 +1340,8 @@ var Events = Module("events", {
// Huh? --djk
onFocusChange: function onFocusChange(event) {
function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument
if (dactyl.ignoreFocus)
return;
let win = window.document.commandDispatcher.focusedWindow;
let elem = window.document.commandDispatcher.focusedElement;