getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.86k stars 1.55k forks source link

Dead clicks are created when users navigate back in a MPA #12666

Open billyvg opened 2 months ago

billyvg commented 2 months ago

For MPA, dead clicks are created if users click a link and then navigates back. The bfcache preserves the timer state and resumes it when the user navigates back and the page is restored from bfcache. We should probably clear our dead click timers when the page is restored from bfcache (and maybe even when it begins to enter bfcache).

aaronjensen commented 2 months ago

Would this cause the page that was visited before hitting the back button not to show up in the replay at all?

mydea commented 2 months ago

it should not, but bfcache may be messing things up for us somehow, I guess 🤔