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
We are trying to add Turbo 8 (using morphing) to an existing project. Since the project is quite large, we have Turbo disabled globally, but are turning it on for one particular page. However, the back button for our anchor links on the non-Turbo pages no longer works as expected. We have tried disabling Turbo through Turbo.session.drive = false as well as just setting data-turbo="false" on the body tag.
Here is a small Rails example that reproduces this. In the example, Turbo.session.drive is set to false, and clicking the anchor link on the /home/index page correctly jumps to the anchor. However, when clicking the back button, nothing happens. Clicking the back button a second time will bring the user back to the top of the page. On the /home/turbo page, Turbo is turned on and the anchor link works as expected with the correct back button behavior.
I noticed that clicking the anchor link on the /home/index page does not cause the data-turbo-visit-direction="forward" to get applied to the html tag. However, when clicking the back button, data-turbo-visit-direction gets set to "back" and nothing happens.
The back button for links to-and-from Turbo to non-Turbo pages work as expected.
The text was updated successfully, but these errors were encountered:
We are trying to add Turbo 8 (using morphing) to an existing project. Since the project is quite large, we have Turbo disabled globally, but are turning it on for one particular page. However, the back button for our anchor links on the non-Turbo pages no longer works as expected. We have tried disabling Turbo through
Turbo.session.drive = false
as well as just settingdata-turbo="false"
on the body tag.Here is a small Rails example that reproduces this. In the example,
Turbo.session.drive
is set tofalse
, and clicking the anchor link on the/home/index
page correctly jumps to the anchor. However, when clicking the back button, nothing happens. Clicking the back button a second time will bring the user back to the top of the page. On the/home/turbo
page, Turbo is turned on and the anchor link works as expected with the correct back button behavior.I noticed that clicking the anchor link on the
/home/index
page does not cause thedata-turbo-visit-direction="forward"
to get applied to thehtml
tag. However, when clicking the back button,data-turbo-visit-direction
gets set to "back" and nothing happens.The back button for links to-and-from Turbo to non-Turbo pages work as expected.
The text was updated successfully, but these errors were encountered: