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

link-follow doesn't work for content loaded via ajax/xhr #362

Open chadoh opened 6 years ago

chadoh commented 6 years ago

I'm opening this issue because:

Description

When page content is loaded dynamically, Vim Vixen does not notice it. I have to reload the page in order to use the f functionality for all newly-loaded content.

Not sure how this library is built, but back in my jQuery days these sorts of issues were fixed by changing lines like this:

$('a').on('click', handler)

to lines like this:

$(document).on('click', 'a', handler)

Failure Information (for bugs)

Vim Vixen fails to do its job for a large and growing portion of the web.

Steps to Reproduce

  1. Visit any site with dynamically-loaded content, such as a default Rails app with turbolinks enabled
  2. Do something to trigger a dynamic content load, such as using Vim Vixen's f to follow a link
  3. Observe that the dynamically loaded content cannot be navigated using Vim Vixen's f

System configuration

dessalines commented 4 years ago

Can verify this is a serious problem. I have a single-page web app, that should never reload the page, yet vim vixen isn't simulating mouse clicks whenever I click a link, it reloads the full page.

chadoh commented 4 years ago

That sounds like a different issue, @dessalines. Consider creating a new issue; I’ll upvote it!

dessalines commented 4 years ago

Ah, okay.