turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 431 forks source link

Script tags evaluated twice #591

Closed jordanthomas closed 9 years ago

jordanthomas commented 9 years ago

In Safari and Chrome script tags are evaluated twice during partial replacements when they appear in the response or part of a data-tubolinks-temporary element.

The behavior appears to be introduced In commit ad55a18ef50a4ccb0b5923a8593cdeb4c8251f9c; specifically on line 180 of that commit (and possibly 176?).

I have a pull request adding a test for this. I'd be happy to expand upon it if someone could help me understand what problem was being solved in the commit above.

Thibaut commented 9 years ago

Fixed by 27318d2f0ab37e0abfee405e1bb85dde7d90f226.