I’ve a link within a turbo-frame (wrapper) with a data-turbo-target outside the frame (modal_content). This construction doesn’t work on the first click after a page reload. I tried to debug this and saw that the clickBubbled method from turbo drive (LinkClickObserver) isn’t triggered on the first click after a full page reload. The second time it is
Placing the link outside the turbo-frame “repairs” this behaviour and it works correctly on the first click.
Not working on first click after a full page reload:
<turbo-frame id="wrapper"> <a class="btn btn-primary" data-turbo-frame="modal_content" href="/admin2/management/users/new"> Add user</a> </turbo-frame>
I’m loading by js pack in the head with the defer attribute. Placing it just before the also seems to fix the issue, but gives the warning:
Hope that someone can point me in the right direction.
ps. Working with Turbo 7.0.1.