]> git.gir.st - VimFx.git/commit
Improve autofocus prevention after `[` and `]`
authorSimon Lydell <simon.lydell@gmail.com>
Thu, 21 Jan 2016 16:34:04 +0000 (17:34 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Thu, 21 Jan 2016 16:34:04 +0000 (17:34 +0100)
commitafa125d304fb19fcc89f2e173872ddcecd3f8fec
treef0e59cbf2c4ad3223ce83dbab74aecc2b73f2fe4
parent94f52527282846783c9256b7ba0f2db83c218511
Improve autofocus prevention after `[` and `]`

When you go to the next page of GitHub’s code search results, the page is loaded
with AJAX. GitHub then annoyingly focuses its search input. This autofocus
cannot be prevented in a reliable way, because the case is indistinguishable
from a button whose job is to focus some text input. However, after the `[` and
`]` command we know for sure that we can prevent the next focus. This commit
resets the `vim.state.hasInteraction` flag in those commands to allow for this
behavior, by adding the `value=true` parameter to `vim.markPageInteraction()`
and passing in `false`.

Fixes #675.
documentation/api.md
extension/lib/commands-frame.coffee
extension/lib/vim-frame.coffee
extension/lib/vim.coffee
Imprint / Impressum