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

Safari 17: safari.self.addEventListener doesn't work in about:blank after window.open() #48

Open
lapcat opened this issue Jun 17, 2024 · 0 comments

Comments

@lapcat
Copy link
Owner

lapcat commented Jun 17, 2024

In Safari 17 app extensions, safari.self.addEventListener doesn't appear to do anything in about:blank windows that are created by calling window.open(). This is a regression, because it worked as expected in Safari 16.6.1.

Attached is a sample Safari app extension Xcode project to demonstrate the bug.
AboutBlankBug.zip

Below is the source for a sample HTML page to demonstrate the bug. For some reason, Github doesn't allow attaching HTML files.

<!DOCTYPE html>
<html>
<head>
<title>about:blank bug</title>
</head>
<body>
<h1>about:blank bug</h1>
<p>
<button type="button"><code>window.open()</code></button></p>
<script>
document.querySelector("button").addEventListener("click", (event) => {
    window.open();
});
</script>
</body>
</html>
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

No branches or pull requests

1 participant