What happened in https://github.com/tridactyl/tridactyl/issues/1615 was
that when pressing `<Space>`, tridactyl tried to run `hint.pushKey `.
Since our ex command parser didn't care about whitespace, nothing
happened.
This is fixed by having a specific ex command to push `<Space>` the hint
filter.
On some websites, searching for specific strings could result in errors
because some matches did not have a rectangle (= they were hidden from
the page). This commit fixes that.
Before 7717c18, calling `config.get()` would result in target being an
empty array. After 7717c18, `config.get()` resulted in `target` being an
array containing one element, `undefined`. Since there isn't any
setting named `undefined`, get completions returned `undefined` and
completions gracefully failed.
We fix this by turning `target` into an empty array if `target_typed` is
undefined.
This commit turns hint mode into a real mode. This required several
changes:
- In `src/content/hinting.ts`: create a function named getHintCommands
which returns an object containing functions that can be used as ex
commands.
- In `src/content/hinting.ts`: rewriting the `parser` function to have
it check the `hintmaps` object in the config and trigger these if
they're bound to anything. We can't use a generic parser because
vimperator hints need to catch every single keypress, even the ones
that aren't bound to anything and act on them.
- Creating `src/background/hinting.ts`, which just wraps ex commands
from src/content/hintings.ts in a proxy which will forward calls to the
content script.
Also document noiframeon, which I discovered was undocumented
because of the type checking.
It makes splatted config.gets rather uglier with `...args` ->
`args[0] as keyof config.default_config, args.slice(1)...`.
It has apparently also broken config completions.
This commit fixes a bug reported by cmcaine. The issue was that when you
have multiple windows on multiple workspaces, taball wouldn't switch
focus to the right tab. This happened because taball relied on
browser.windows.update(id, {focused: true}) having switched to the right
window before calling idFromIndex. This didn't always work because
sometimes window managers will keep the current window focused.
Some pages manage to focus a hidden input field on page load. This puts
tridactyl in insert mode without the user being aware of it. This commit
actively protects users who set `allowautofocus` to "false" against
this.
Closes https://github.com/tridactyl/tridactyl/issues/1492