mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 11:47:59 +01:00
Hopefully deal with our lost focus issues once and for all.
Update issue 131 Status: Started This should hopefully take care of this issue. Update issue 212 Status: Started This should hopefully take care of this issue. --HG-- branch : bootstrapped
This commit is contained in:
@@ -623,10 +623,8 @@ var CommandLine = Module("commandline", {
|
||||
this.widgets.message = null;
|
||||
if (modes.main != modes.COMMAND_LINE)
|
||||
this.widgets.command = null;
|
||||
if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd) {
|
||||
dactyl.focusContent();
|
||||
if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd)
|
||||
modes.pop();
|
||||
}
|
||||
if (modes.main != modes.OUTPUT_MULTILINE)
|
||||
this.multilineOutputVisible = false;
|
||||
},
|
||||
|
||||
@@ -93,6 +93,7 @@ var Events = Module("events", {
|
||||
this._activeMenubar = false;
|
||||
this.addSessionListener(window, "DOMMenuBarActive", this.onDOMMenuBarActive, true);
|
||||
this.addSessionListener(window, "DOMMenuBarInactive", this.onDOMMenuBarInactive, true);
|
||||
this.addSessionListener(window, "blur", this.onBlur, true);
|
||||
this.addSessionListener(window, "focus", this.onFocus, true);
|
||||
this.addSessionListener(window, "keydown", this.onKeyUpOrDown, true);
|
||||
this.addSessionListener(window, "keypress", this.onKeyPress, true);
|
||||
@@ -724,6 +725,15 @@ var Events = Module("events", {
|
||||
}
|
||||
},
|
||||
|
||||
onBlur: function onFocus(event) {
|
||||
if (event.originalTarget instanceof Window && services.focus.activeWindow == null)
|
||||
// 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
|
||||
// input.
|
||||
services.focus.clearFocus(window);
|
||||
},
|
||||
|
||||
// TODO: Merge with onFocusChange
|
||||
onFocus: function onFocus(event) {
|
||||
let elem = event.originalTarget;
|
||||
|
||||
Reference in New Issue
Block a user