Skip to content

Conversation

Bluenix2
Copy link
Member

This means that the browser will prompt the user before it tries to close the page, that way someone cannot accidentally close the page mid-submission.

Currently this does not work for the home a element (Python Discord logo), for some reason it does not appear to trigger the beforeunload event that we subscribe to. Further investigation could be made into adding an onclick to this element that will throw a similar prompt and potentially cancel, or find a way to also trigger beforeunload events when clicking this element.

This will make the browser prompt the user before they try to reload or close the page if they have a form open.
@janine9vn janine9vn linked an issue Dec 26, 2021 that may be closed by this pull request
@HassanAbouelela HassanAbouelela removed their request for review August 4, 2022 05:45
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.

Prevent Accidental Closing of Form
1 participant