jonhue / turbolinks-animate

Rich & adaptive animations for apps using Turbolinks
MIT License
134 stars 9 forks source link

Can't link to specific part of page #67

Open mark-kraemer opened 4 years ago

mark-kraemer commented 4 years ago

Describe the bug While using turbolinks animate, the normal browser behavior of linking a specific element on the page from the url breaks

To Reproduce Steps to reproduce the behavior:

  1. Have turbolinks animate on the page. I currently have document.addEventListener('turbolinks:load', () => TurbolinksAnimate.init()) run in my
  2. Have an element with an id of #some-id down the page
  3. visit http://your-site.com#some-id
  4. It doesn't scroll down to that id
  5. remove the TurbolinksAnimate.init() from the
  6. visit http://your-site.com#some-id
  7. It scrolls down to the part of the page it should as browsers normally do.

Expected behavior visiting http://your-site.com#some-id should scroll the element with id="some-id" should work by default in browsers

Desktop (please complete the following information):

jonhue commented 4 years ago

Unfortunately, I don't think that I'll have time to look into this in the next couple of weeks. I'm always happy to review pull requests though 🙂.