Skip to content

api.BeforeUnloadEvent - unsupported on iOS due to a bug #27459

@marto55555

Description

@marto55555

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

The beforeunload event is unsupported on iOS and iPad due to a bug: https://bugs.webkit.org/show_bug.cgi?id=219102

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

The beforeunload event should work and prevent automatic navigation to a different website, etc.

Did you test this? If so, how?

Yes, tested on an iPhone with iOS 18.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

Related bug: https://bugs.webkit.org/show_bug.cgi?id=219102

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent

MDN metadata

MDN page report details
  • Query: api.BeforeUnloadEvent
  • Report started: 2025-07-31T13:00:52.147Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/APIneeds triageThis issue needs to be confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions