Repository navigation
Embedded BR should open IA in new tab if fullscreen exited #1469
Description
Activity
I can reproduce this issue and would like to work on a fix.
@cdrini This seems like an iframe fullscreen limitation.
Possible fix: detect fullscreenchange inside embedded BR and trigger window.open('/details/…', '_blank') instead of minimizing the iframe.
This would align with expected IA behavior outside embeds.Summary
When the Internet Archive BookReader is embedded inside an iframe, clicking either the IA button or the Exit Fullscreen button causes the reader to minimize inside the iframe. Instead of minimizing, these actions should open the book’s /details/ page in a new tab or window.
This behavior is confusing and breaks the expected navigation flow for embedded readers.
Evidence / Screenshot
Screenshot 1 – BookReader in Fullscreen (Before Click)
Shows BookReader running in fullscreen mode
IA button visible in the top-left corner
Exit Fullscreen control visible in the bottom-right corner
Screenshot 2 – After Clicking IA / Exit Fullscreen
BookReader exits fullscreen
Reader collapses/minimizes inside the iframe
/details/ page is not opened
These screenshots clearly demonstrate the incorrect behavior when interacting with the IA and fullscreen controls in an embedded context.
Expectation
What should happenClicking the IA button should:
Open the book’s /details/ page in a new tab or window
Clicking Exit Fullscreen should:
Exit the embedded reader and redirect the user to the /details/ page in a new tab/window
How it should look / behave when fixed
No iframe minimization
Clear navigation to the book’s details page
Behavior consistent with the standalone BookReader experience
Current Behavior
BookReader exits fullscreen
The iframe collapses or minimizes
User remains on the embedded page
Navigation to /details/ does not occur
Context
Operating System: Windows
Browser: Google Chrome (latest stable)
Environment:
Internet Archive BookReader
Embedded within an iframe
Fullscreen mode enabled
Proposal & Constraints
Proposed Solution (Unique & Targeted)Detect when BookReader is running inside an iframe and override the default behavior of the IA button and Exit Fullscreen button.
Recommended approach:
On IA / Exit Fullscreen click:
Prevent iframe fullscreen exit/minimize behavior
Explicitly open the details page using the parent context, e.g.:
window.open(detailsUrl, '_blank')
or window.top.location.href = detailsUrl (where permitted)
This keeps iframe behavior intentional and avoids accidental UI collapse.
Why this works
The standalone BookReader already navigates correctly to /details/
This solution aligns iframe behavior with existing, expected behavior
It avoids relying on browser fullscreen defaults, which behave inconsistently in iframes
Constraints
Must respect iframe sandbox and cross-origin limitations
Should not alter behavior for non-iframe BookReader usage
Stakeholders
@cdrini sir can you check the solution is correct or not
Currently, clicking the IA button or the exit fullscreen button minimized bookreader inside the iframe. It should instead open the
/details/page in a new tab/window.Evidence / Screenshot (if possible)
Expectation
Context
Proposal & Constraints
Stakeholders