mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-08 23:24:14 +01:00
Fix some smallish focus issued.
This commit is contained in:
@@ -258,7 +258,7 @@ var Buffer = Module("buffer", {
|
||||
else if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
|
||||
// Workaround for bugs 591425 and 606877, dactyl bug #81
|
||||
config.browser.mCurrentBrowser.collapsed = false;
|
||||
if (!dactyl.focusedElement)
|
||||
if (!dactyl.focusedElement || dactyl.focusedElement === document.documentElement)
|
||||
dactyl.focusContent();
|
||||
statusline.updateUrl();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -976,9 +976,9 @@ var Tabs = Module("tabs", {
|
||||
return value;
|
||||
},
|
||||
completer: function (context) [
|
||||
["never", "Never show tab bar"],
|
||||
["multitab", "Show tab bar when there are multiple tabs"],
|
||||
["always", "Always show tab bar"]
|
||||
["never", "Never show the tab bar"],
|
||||
["multitab", "Show the tab bar when there are multiple tabs"],
|
||||
["always", "Always show the tab bar"]
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user