-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to have turbo-ios ignore certain link clicks? #176
Comments
Does PR #160 solve your issue? |
The path to achieve page refreshes without adding onto the nav stack is to use Turbo 8 + same-page refreshes with morphing. See: https://turbo.hotwired.dev/handbook/page_refreshes and #178 which provides full Turbo 8 refresh support. If you don't want Turbo to handle link clicks at all, you can disable this per-link and use your own custom event listener: https://turbo.hotwired.dev/handbook/drive#disabling-turbo-drive-on-specific-links-or-forms |
@jayohms - I am not trying to refresh the page in this instance, I'm navigating to a new different URL that just happens to have a similar layout. Is morphing appropriate here? I’d just like to skip turbo-ios intercepting these link clicks so the turbo navigation happens in the webview. Then my page transition CSS animations would work like they do on the web. I thought maybe there was a way to have turbo-ios ignore certain links, but perhaps not? Thanks in advance. |
No, this isn't possible. Morphing with Turbo 8 in the browser works when the url paths are the same. Morphing between different urls is not supported.
No, this works against the design of the library. The main benefit of the library is to give you a native |
@jayohms Ok, thanks for the clarification. I'll work around it for now and seek a native solution in time. |
I have a page on my Turbo-iOS app where I'm animating navigations between two tabs like so:
tabs-min.mov
This works well on the web. I'm just using a stimulus controller to intercept outgoing and incoming content to apply CSS animations. My HTML is therefore very simple - it just looks like this (CSS classes removed for clarity):
On iOS, I have an issue where can't see these transitions because I'm pushing new native views for each navigation in my app:
tabs-ios-min.mov
To solve this, is there a way to prevent turbo-ios from intercepting certain links? I'd like these specific navigations to just occur within the webview like they would on the web.
Apologies if this is answered somewhere, I've been searching for a couple of hours now for a solution with no luck. Thank you for reading! 🙌
The text was updated successfully, but these errors were encountered: