Skip to content
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

Replace deprecated unload event with pagehide event #824

Merged
merged 1 commit into from
May 23, 2024

Conversation

jul13579
Copy link
Contributor

@jul13579 jul13579 commented May 23, 2024

Dear hocuspocus folks,

I noticed that the HocuspocusProvider is using the deprecated unload event. MDN advises to use the pagehide event instead, so this is what I chose to use for this PR. I searched for any open and closed issues and PRs that could be related to this and hence am aware of #658 and #657, where the previously used beforeunload event was found to be problematic.

I checked if the pagehide event also fires when starting a download as described in #657 and found that it in fact does not fire. Therefore I think this event might be a viable alternative to unload.

Cheers,
Julian

@janthurau janthurau merged commit 194f43e into ueberdosis:main May 23, 2024
3 checks passed
@janthurau
Copy link
Collaborator

Thanks! Sounds good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants