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

window.onbeforeunload does not work on iOS/iPadOS #73

Open
lorenzocorallo opened this issue Apr 21, 2023 · 1 comment
Open

window.onbeforeunload does not work on iOS/iPadOS #73

lorenzocorallo opened this issue Apr 21, 2023 · 1 comment
Labels
type: bug Verified problems that need to be worked on
Milestone

Comments

@lorenzocorallo
Copy link
Contributor

Description

Doing some tests in the PR #72, it was discovered that the window.onbeforeunload event handler, used to prevent page reload while doing the test, does not work on iOS and iPadOS.
This method has been used for a long time, so the website has probably always suffered from this problem, but there seem to have been no previous reports.
At the moment, no fix has been found, also because of the lack of methods to detect Apple mobile devices accurately and to interrupt page reload with a prompt.

Steps to reproduce

  1. Open the website using an iOS device
  2. Enter the test section (using the start button in the homepage)
  3. Reload the page
    If this bug applies, the page should reload and not ask to confirm exit.

Expected behaviour

The event handler window.onbeforeunload (or any other future alternative) should ask the user to confirm to exit the test.

Notes

If a solution is not found in the near future, feel free to close this issue as stale

@EndBug
Copy link
Member

EndBug commented Apr 22, 2023

Can reproduce on iPhone 13 via BrowserStack 🐛

@EndBug EndBug added the type: bug Verified problems that need to be worked on label Apr 22, 2023
@EndBug EndBug added this to the Future milestone Apr 22, 2023
@lorenzocorallo lorenzocorallo changed the title Bug: window.onbeforeunload does not work on iOS/iPadOS window.onbeforeunload does not work on iOS/iPadOS Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Verified problems that need to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants