mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-10 18:05:46 +01:00
Fix some command line focus issues.
This commit is contained in:
@@ -966,7 +966,8 @@ var Events = Module("events", {
|
||||
|
||||
blur: function onBlur(event) {
|
||||
let elem = event.originalTarget;
|
||||
if (event.originalTarget instanceof Window && services.focus.activeWindow == null) {
|
||||
if (elem instanceof Window && services.focus.activeWindow == null
|
||||
&& document.commandDispatcher.focusedWindow !== window) {
|
||||
// Deals with circumstances where, after the main window
|
||||
// blurs while a collapsed frame has focus, re-activating
|
||||
// the main window does not restore focus and we lose key
|
||||
@@ -974,6 +975,12 @@ var Events = Module("events", {
|
||||
services.focus.clearFocus(window);
|
||||
document.commandDispatcher.focusedWindow = Editor.getEditor(content) ? window : content;
|
||||
}
|
||||
|
||||
let hold = modes.topOfStack.params.holdFocus;
|
||||
if (elem == hold) {
|
||||
dactyl.focus(hold);
|
||||
this.timeout(function () { dactyl.focus(hold); });
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: Merge with onFocusChange
|
||||
|
||||
Reference in New Issue
Block a user