Skip to content

[Bug]: Annotation tools can't select anything inside a cross-origin or opaque sandboxed iframe #41960

Backlog

Description

@eron1703

Area

apps/desktop

Steps to reproduce

  1. Serve a page whose content lives in a sandboxed srcdoc iframe without allow-same-origin, nested in a same-origin iframe. This is how some portals isolate embedded app code from the host session:

    <iframe id="hub-frame" sandbox="allow-scripts allow-same-origin"></iframe>
    <!-- inside hub-frame: -->
    <iframe id="view-frame" sandbox="allow-scripts" srcdoc="... <button id='deep-save'>Save lead</button> ..."></iframe>
  2. Open it in the desktop Browser panel and start Annotate → Select.

  3. Hover or click the button inside view-frame.

Expected behavior

The button is outlined, selected, and attached with its rect and a selector, like any element in the top document.

Actual behavior

Nothing below the top document can be picked. Pointer input over the frame goes to the frame's own document, so the picker never sees it: no hover outline, the click goes through to the page, and the annotation never opens. The inner frame has an opaque origin (window.origin === "null"), so it cannot be reached through contentDocument either; #30185 covers same-origin frames and explicitly leaves cross-origin frames opaque.

Impact

Major degradation: in apps that render their body in sandboxed or cross-origin frames, only the outer chrome can be annotated.

Version or commit

T3 Code (Nightly) 0.1.11-nightly.20261117.4838, desktop (macOS). Still reproduces on main a6c69be8df.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions