mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-17 19:43:33 +01:00
Fix bluring editible windows, I hope.
This commit is contained in:
@@ -527,9 +527,11 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
if (dactyl.focusedElement)
|
if (dactyl.focusedElement)
|
||||||
dactyl.focusedElement.blur();
|
dactyl.focusedElement.blur();
|
||||||
if (win && Editor.getEditor(win)) {
|
if (win && Editor.getEditor(win)) {
|
||||||
win.blur();
|
this.withSavedValues(["ignoreFocus"], function _focusContent() {
|
||||||
if (win.frameElement && false)
|
this.ignoreFocus = true;
|
||||||
win.frameElement.blur();
|
if (win.frameElement)
|
||||||
|
win.frameElement.blur();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1340,6 +1340,8 @@ var Events = Module("events", {
|
|||||||
// Huh? --djk
|
// Huh? --djk
|
||||||
onFocusChange: function onFocusChange(event) {
|
onFocusChange: function onFocusChange(event) {
|
||||||
function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument
|
function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument
|
||||||
|
if (dactyl.ignoreFocus)
|
||||||
|
return;
|
||||||
|
|
||||||
let win = window.document.commandDispatcher.focusedWindow;
|
let win = window.document.commandDispatcher.focusedWindow;
|
||||||
let elem = window.document.commandDispatcher.focusedElement;
|
let elem = window.document.commandDispatcher.focusedElement;
|
||||||
|
|||||||
Reference in New Issue
Block a user