diff --git a/turbo/src/main/assets/js/turbo_bridge.js b/turbo/src/main/assets/js/turbo_bridge.js index f5be4919..1cdd237e 100644 --- a/turbo/src/main/assets/js/turbo_bridge.js +++ b/turbo/src/main/assets/js/turbo_bridge.js @@ -92,6 +92,13 @@ // Adapter interface visitProposedToLocation(location, options) { + if (window.Turbo && typeof Turbo.navigator.locationWithActionIsSamePage === "function") { + if (Turbo.navigator.locationWithActionIsSamePage(location, options.action)) { + Turbo.navigator.view.scrollToAnchorFromLocation(location) + return + } + } + TurboSession.visitProposedToLocation(location.toString(), JSON.stringify(options)) }