| Summary: | The `beforeunload` event doesn't occur when clicking on a link | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Tee Ming <chewteeming01> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Blocker | CC: | ap, beidson, cdumez, karlcow, nham, rniwa, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari 16 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=206366 | ||
| Attachments: | |||
|
Description
Tee Ming
2023-04-22 22:06:11 PDT
The attached test case doesn't contain "preventDefault()", is this one that you intended to provide? It does behave differently that in Chrome, but I'd like to make certain that we are talking about the same issue. Created attachment 466055 [details]
The HTML file contains a link that should be intercepted by the beforeunload event (event.preventDefault).
(In reply to Alexey Proskuryakov from comment #1) > The attached test case doesn't contain "preventDefault()", is this one that > you intended to provide? It does behave differently that in Chrome, but I'd > like to make certain that we are talking about the same issue. Sorry about that. I forgot to include the `event.preventDefault()` line in the test case. I've uploaded an updated test case that includes the line. After another look at this, it seems the confirmation dialog isn't appearing because the `beforeunload` event is never invoked when clicking on the link. |