Looking at the `turbo:click` docs: > Cancel this event to let the click fall through to the browser as normal navigation. Though if your link triggers a frame navigation, running `preventDefault()` doesn't cancel it. --- `document.addEventListener('turbo:click', (e) => e.preventDefault())` on a Visit: https://user-images.githubusercontent.com/11280312/175405211-c6b112ea-1fd7-4afe-93b8-04cde5e910fa.mov --- `document.addEventListener('turbo:click', (e) => e.preventDefault())` on a frame: https://user-images.githubusercontent.com/11280312/175405308-19dcfbe7-de8f-4d88-8d08-72d3af4b943c.mov
Looking at the
turbo:clickdocs:Though if your link triggers a frame navigation, running
preventDefault()doesn't cancel it.document.addEventListener('turbo:click', (e) => e.preventDefault())on a Visit:Screen.Recording.2022-06-23.at.4.25.54.PM.mov
document.addEventListener('turbo:click', (e) => e.preventDefault())on a frame:Screen.Recording.2022-06-23.at.4.26.51.PM.mov