I have been using @readium/navigator and found a problem, the library can suddenly show a blank page (often after resize/layout changes) even though nothing in the app threw an error and the iframe is still there.
Tracing it, I notice that FrameManager.load() causes the iframe to navigate through contentWindow.location.replace(source) but never sets iframe.src.
After a successful load the document becomes visible, but the iframe’s src stays at its default (about:blank / empty). Any later browser navigation that goes through src (e.g. remounting/reparenting the iframe, or other src-based reload) restores about:blank. The iframe element remains in the DOM and looks fine; the app gets no load error from the navigator.
The same pattern seems to exist in FXLFrameManager and WebPubFrameManager.
// FrameManager.load()
this.frame.contentWindow!.location.replace(this.source);
// iframe.src is never set
So after location.replace(blobUrl) the document content is correctly loaded, but iframe.src is empty. So moving the iframe in the DOM (or otherwise reloading from src) then shows a blank page.
I have been using
@readium/navigatorand found a problem, the library can suddenly show a blank page (often after resize/layout changes) even though nothing in the app threw an error and the iframe is still there.Tracing it, I notice that
FrameManager.load()causes the iframe to navigate throughcontentWindow.location.replace(source)but never setsiframe.src.After a successful load the document becomes visible, but the iframe’s
srcstays at its default (about:blank/ empty). Any later browser navigation that goes throughsrc(e.g. remounting/reparenting the iframe, or othersrc-based reload) restoresabout:blank. The iframe element remains in the DOM and looks fine; the app gets no load error from the navigator.The same pattern seems to exist in
FXLFrameManagerandWebPubFrameManager.So after
location.replace(blobUrl)the document content is correctly loaded, butiframe.srcis empty. So moving the iframe in the DOM (or otherwise reloading fromsrc) then shows a blank page.