Giter Site home page Giter Site logo

Comments (6)

wycats avatar wycats commented on August 16, 2024

Issues like this are why Turbolinks is a bad idea.

from turbolinks-classic.

davydotcom avatar davydotcom commented on August 16, 2024

This is true, actually not a difficult fix either. This was implemented before turbolinks decided to retain events on the dom on page change. I would recommend avoiding writing any js in the document.body if you can avoid it. This was added to help those who couldnt do that for various reasons.

However, now that the dom is preserved in the history, along with all event listeners, this really needs to only be executed on page:load type fetch requests and not when pages are restored from history cache.

from turbolinks-classic.

davydotcom avatar davydotcom commented on August 16, 2024

I'll try and submit a pull request that does just that this evening for you.

from turbolinks-classic.

dhh avatar dhh commented on August 16, 2024

@wycats Either help in the search for solutions or go heckle another git repo.

from turbolinks-classic.

davydotcom avatar davydotcom commented on August 16, 2024

@fklingler would appreciate testing on pull request #91 with regards to your issue.

from turbolinks-classic.

davydotcom avatar davydotcom commented on August 16, 2024

I believe this issue can be closed now.

from turbolinks-classic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.