ueokande / vim-vixen

Accelerates your web browsing with Vim power!!
https://ueokande.github.io/vim-vixen/
MIT License
2.11k stars 137 forks source link

Key bindings become ineffective after a while on Github #1443

Open phi-gamma opened 2 years ago

phi-gamma commented 2 years ago

I'm opening this issue because:

Description

On github.com Vim Vixen keybindings work initially after opening a page but then become ineffective after a while. For me this happens on the “notifications” page.

Sometimes the key bindings are ineffective from the start. E. g. I just opened this project: https://github.com/stratis-storage/stratisd and navigation vi j / h or C-u / C-d is not possible. Nor is closing the tab with d etc. This does not occur consistently; Vim Vixen worked when I opened the same URL in another tab.

The console does not print debug info in that state.

This behavior appeared only recently, presumably due to a change in Github’s JS.

Failure Information (for bugs)

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Open some project’s Github page.
  2. Try Vim Vixen key bindings; often they work for a while until they don’t.
  3. Optionally do stuff on other tabs and come back after a while.
  4. Vim Vixen key bindings have ceased to work.

System configuration

Console logs

Silence, unfortunately.

agjohnson commented 2 years ago

I have also noticed this, it seems non-deterministic and often randomly happens immediately for me too.

I've assumed this is not an issue with vim-vixen, but with GitHub doing something unwanted, but can't really prove this either. I've followed GitHub's own advice and turned off key bindings in my accessibility settings:

image

Currently, I'm noticing that no hotkeys work on one of my tabs: vim-vixen bindings aren't working, and GitHub hotkeys like ? and gg don't work. But I do feel like I've noticed vim-vixen stop working and the GitHub hotkeys take over (? brings up the GitHub hotkey menu).

In addition to this, I had github-refined installed as well, though disabling this didn't seem to help either.

I can somewhat reliably reproduce this as well, if there is any way to help debug this.

agjohnson commented 2 years ago

I take that back. I just tried using vixen bindings on a tab, it didn't work, and I was able to hit ? and bring up the GitHub key binding menu

I'd be curious if others notice the same behavior with the same accessibility settings.

My current guess is that GitHub is not respecting their own setting and is loading a keypress event handler later in the loading process than vim-vixen :shrug:

toastal commented 2 years ago

The worst is not having find via /. This tends to happen when I go to the code review section--which happens to be a section I want to search in and the ability to use the add-on never seems to return. With the settings turned off, and the the command palette disabled, I still get issues. I don't have issues with Codeberg or SourceHut. With all that Microsoft money, you'd think GitHub could offer a better product.

twitu commented 2 years ago

I was facing the same issue. @agjohnson's suggestion of turning of the character keys fixes it for me. Most of the common keys I use work after turning off this setting.

zoj613 commented 2 years ago

I turned off the charecter keys setting and I still cant use j/k for smooth scrolling nor gg and G.

agjohnson commented 2 years ago

I'm still encountering this, and actually, I'm now encountering this behavior consistently and immediately. I have disabled both the character keys setting, and also opted out of the command palette feature preview, and neither setting helped.

I have found that reloading the page fixes the vim vixen hotkeys temporarily though.

I opened a ticket open with GitHub, but seems they are stumped as I haven't heard anything back in a while.