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

In zimit2 ZIMs, when the content specifies opening a link in a new browser window/tab, the main app window blanks out #572

Open
Jaifroid opened this issue Feb 29, 2024 · 2 comments

Comments

@Jaifroid
Copy link
Member

The content does load in the new tab or window (in browser), and is fully navigable, but there are no app search or navigation bars in that instance. That is as expected, but what should not happen is that the main app UI is blanked out and all navigation controls disappear.

What appears to be happening is that the app is unaware that a new tab has been opened. The Service Worker has no idea of the DOM, so can't tell which client is requesting resources. Because the app believes it is loading a local resource, it tears down the existing article in the iframe ready to receive new content, which instead goes to the new window/tab.

This does not happen if the new tab/window is one opened by the app itself as a result of a user gesture. So, to fix this, we need to handle the fact that the content will be sent by the SW to a different client. We already know how to do this in the message channel event, but it needs to be coordinated.

@Jaifroid
Copy link
Member Author

This does not happen upstream in KJS. The article does load in a new window/tab, but the main app remains perfectly usable. So it's very much a bug/regression specific to this Repo's earlier implementation.

@Jaifroid Jaifroid changed the title In (at least) zimit2 ZIMs, when the content specifies opening a link in a new browser window/tab, the main app window blanks out In zimit2 ZIMs, when the content specifies opening a link in a new browser window/tab, the main app window blanks out Feb 29, 2024
@Jaifroid
Copy link
Member Author

Issue is confirmed to affect only zimit2, not zimit1 archives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant