Skip to content

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

@Jaifroid

Description

@Jaifroid

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions