Fix #386: add hintdelay setting

As a bonus, move glacambre's goal posts
This commit is contained in:
Oliver Blanthorn 2018-08-03 22:01:28 +01:00
parent 20d8ec0309
commit aaa0016fc5
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 2 additions and 2 deletions

View file

@ -286,6 +286,7 @@ const DEFAULTS = o({
hintfiltermode: "simple", // "simple", "vimperator", "vimperator-reflow"
hintnames: "short",
hintuppercase: "true",
hintdelay: "300",
// Controls whether the page can focus elements for you via js
// Remember to also change browser.autofocus (autofocusing elements via

View file

@ -605,8 +605,7 @@ export function hintSave(hintType: HintSaveType, saveAs: boolean) {
function selectFocusedHint() {
logger.debug("Selecting hint.", state.mode)
const focused = modeState.focusedHint
reset()
focused.select()
setTimeout(_=>{reset(); focused.select()},config.get("hintdelay"))
}
import { addListener, attributeCaller } from "./messaging"