Closed klevo closed 5 months ago
Thank you for opening this issue. Could this unexpected behavior be resolved by https://github.com/hotwired/turbo/pull/1213?
@seanpdoyle I tested it but unfortunately it does not solve the issue. The problem remains the same.
I figured out the actual issue and the fix, it's the debouncing within Turbo lib itself. I opened a PR there: https://github.com/hotwired/turbo/pull/1250
Therefore I'm closing this issue.
There is a race condition with Turbo 8 refreshes and regular user clicks through the application.
It's rather easy to observe when there is a consistent stream of refreshes generated and user navigates through the pages steadily.
When a refresh broadcast comes in just after the user click, it overrides the user generated turbo visit and the visitor stays on the same page.
Here's a video of the issue:
https://github.com/hotwired/turbo-rails/assets/32981/48f438a6-244f-4070-9439-44044c043d92
/items/2
is my user initiated action./items
page that just arrived (you can see the Updated at times changed from from :05 to :06). This refresh essentially hijacked my click and resulted in me staying on the index page.This is on Safari 17.4.1. I also replicated the same issue in latest Chrome.
I created a simple Rails 7.1 app to demonstrate the issue that is used in the above video with full instructions.