You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.
When having a document structure where an element with tagged with data-turbolinks-permanent is placed inside another one also marked as permanent (depth of hierarchy does not matter) the inner ones are replaced by clones, and thus they lose all their existing event handlers and data.
Expected behavior
Elements with data-turbolinks-permanent inside others that are permanent are correctly reinserted after a navigation.
In the demo case parent, child-0, child-1 and child-2 should be the same.
Interestingly, if in test2.html I remove data-turbolinks-permanent from child-2 it is correctly re-attached.
Details (please complete the following information):
Describe the bug
When having a document structure where an element with tagged with data-turbolinks-permanent is placed inside another one also marked as permanent (depth of hierarchy does not matter) the inner ones are replaced by clones, and thus they lose all their existing event handlers and data.
To Reproduce
There's a bare bones demonstration at https://tangopardo.com.ar/pub/github/turbolinks_nested_issue_demo/index.html
Go to that site, click on 'go to test 2' and hit the 'Compare elements with old dom' button.
Expected behavior
Elements with data-turbolinks-permanent inside others that are permanent are correctly reinserted after a navigation.
In the demo case parent, child-0, child-1 and child-2 should be the same.
Interestingly, if in test2.html I remove data-turbolinks-permanent from child-2 it is correctly re-attached.
Details (please complete the following information):
Thanks for your time
The text was updated successfully, but these errors were encountered: