mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-11 20:23:32 +02: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:
@@ -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