1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 18:54:13 +01:00

Fix some smallish focus issued.

This commit is contained in:
Kris Maglione
2010-12-30 00:17:01 -05:00
parent 6b41435f30
commit 5f1c47ee20
4 changed files with 20 additions and 20 deletions

View File

@@ -719,6 +719,7 @@ var Events = Module("events", {
let rect = dactyl.focusedElement.getBoundingClientRect();
if (!rect.width || !rect.height) {
services.focus.clearFocus(window);
document.commandDispatcher.focusedWindow = content;
// onFocusChange needs to die.
this.onFocusChange();
}
@@ -726,12 +727,14 @@ var Events = Module("events", {
},
onBlur: function onFocus(event) {
if (event.originalTarget instanceof Window && services.focus.activeWindow == null)
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);
document.commandDispatcher.focusedWindow = content;
}
},
// TODO: Merge with onFocusChange