onUnload triggers as soon as window is opened on Safari
See example here: https://codesandbox.io/s/green-lake-n13i3
Use this url to test: https://n13i3.csb.app
Only happens on safari when using url.
The reason is that beforeonunload is triggered in different situations on safari see: https://webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
By replacing this.window.addEventListener('beforeunload', () => this.release()) with this.window.addEventListener('ononload', () => this.release()) the issue would be solved.
same issue on chrome here is example https://codesandbox.io/s/pensive-https-vnqin
Any way we can get this in a new release @rmariuzzo ? Seems like a quick fix.
@joelrojo will review it soon
+1 for this to be fixed!
same issue on Firefox
+1 on a fix for this
@rchiba were you able to reproduce this? Im curious to know if this is a specific version of a browser or it happens for all browsers
Has there been an official fix for this?
Same issue on firefox 2021. Is the lib dead?
The issue is still happening in Safari Version 15.2
I just tried to reproduce this issue on Chrome, Safari and Firefox without success. It seems to have gone with recent published changes. Try updating to latest version of this package.
Note: before recent change, I did notice this issue.