1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 23:57:59 +01:00

Kludge the stupid urlbar focus bug better

This commit is contained in:
Kris Maglione
2008-12-18 21:37:44 -05:00
parent c094a2dd2b
commit 947311dfdf
2 changed files with 68 additions and 65 deletions

View File

@@ -116,13 +116,7 @@ const modes = (function () //{{{
options.setPref("accessibility.browsewithcaret", false);
statusline.updateUrl();
// Kludge to prevent the input field losing focus on MS/Mac
setTimeout(function () {
let focus = document.commandDispatcher.focusedElement;
let urlbar = document.getElementById("urlbar");
if (!urlbar || focus != urlbar.inputField)
liberator.focusContent(false);
}, 0);
liberator.focusContent(false);
}
}
@@ -137,6 +131,8 @@ const modes = (function () //{{{
get all() mainModes.slice(),
get inputMode() main & (this.COMMAND_LINE | this.INPUT | this.TEXTAREA | this.COMPOSE),
addMode: function (name, extended, display) {
let disp = name.replace("_", " ", "g");
this[name] = 1 << lastMode++;