Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Vim Vixen doesn't work properly with single page web apps. #739

Open
1 of 2 tasks
dessalines opened this issue Apr 12, 2020 · 1 comment · Fixed by vim-vix-remix/vim-vix-remix#5
Open
1 of 2 tasks
Labels
site compatible issue occurs on certain site

Comments

@dessalines
Copy link

dessalines commented Apr 12, 2020

I'm opening this issue because:

  • I'll report a bug
  • I'll propose a new feature

Description

I have a single page web app, where most of the links use the browser history router to navigate to different pages. Vim Vixen, instead of following those onClick / onFollowLink directives (or just simulating a click), reloads the web page when using f. My site: https://dev.lemmy.ml

Steps to Reproduce

  1. Go to site above, use f to follow link.
  2. Instead of navigating like a regular mouse click, f reloads the page.

System configuration

  • Operating system: Arch
  • Firefox version: FF 75.0
  • Vim-Vixen version: 0.27
@ueokande ueokande added the site compatible issue occurs on certain site label May 4, 2020
@ouuan
Copy link

ouuan commented Aug 30, 2021

diff --git a/src/content/usecases/FollowSlaveUseCase.ts b/src/content/usecases/FollowSlaveUseCase.ts
index 56c8883..f7a145d 100644
--- a/src/content/usecases/FollowSlaveUseCase.ts
+++ b/src/content/usecases/FollowSlaveUseCase.ts
@@ -68,7 +68,7 @@ export default class FollowSlaveUseCase {
         openNewTab = true;
       }
       // eslint-disable-next-line no-script-url
-      if (!url || url === "#" || url.toLowerCase().startsWith("javascript:")) {
+      if (!newTab || !url || url === "#" || url.toLowerCase().startsWith("javascript:")) {
         hint.click();
         return;
       }

This seems to work properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
site compatible issue occurs on certain site
Projects
None yet
3 participants