turbolinks / turbolinks-ios

Native iOS adapter for building hybrid apps with Turbolinks 5
MIT License
880 stars 92 forks source link

Pull-to-refresh wrong URL #158

Open dpaola2 opened 5 years ago

dpaola2 commented 5 years ago

I have a /home page that loads as part of my turbolinks app. On this page, there is a button that links to /open, which opens a door and redirects back to the /home page.

This works just fine in a turbolinks-enabled iOS app, with one exception. When the user is sitting on the /home page, and they pull to refresh, Turbolinks actually visits the /open URL instead of refreshing the current page!

I have confirmed this with a proxy and lots of logging. It looks to me like the last visit, not the current URL, is the URL that is fetched upon pull-to-refresh.

dpaola2 commented 5 years ago

I have also tried to manually set the Turbolinks-Location header and Turbolinks still insists on reloading the last link that was clicked instead of the current location. Very strange. I've tried to dig around in the Xcode project for Turbolinks, but not being a swift developer, this has been difficult.