Skip to content

Embedded BR should open IA in new tab if fullscreen exited #1469

Description

@cdrini

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)

Include evidence of the problem or provide a screenshot.

Expectation

What should be happening? What will it look like / how will it behave when fixed?

Context

What operating system? What browser type and version?

Proposal & Constraints

What is the proposed solution / implementation? Is there a precedent of this approach succeeding elsewhere?

Stakeholders

@-tag any stakeholders of this bug

Activity

  1. added theissue type on Dec 18, 2025
  2. Deeppanchal2108 commented on Dec 19, 2025

    @Deeppanchal2108

    I can reproduce this issue and would like to work on a fix.

  3. Aayushdev18 commented on Dec 24, 2025

    @Aayushdev18

    @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.

  4. Pankajyadav919 commented on Dec 26, 2025

    @Pankajyadav919

    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)

    Image

    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

    Image

    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 happen

    Clicking 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

  5. Pankajyadav919 commented on Jan 3, 2026

    @Pankajyadav919

    @cdrini sir can you check the solution is correct or not

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions