You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fullscreen overlay is rendered with createPortal(..., document.body) and its container is marked data-streamdown="table-fullscreen" (not table-wrapper). Because a portal detaches DOM ancestry, from inside the fullscreen overlay el.closest('[data-streamdown="table-wrapper"]') returns null, so every action hits the "Table not found" branch and silently no-ops.
This affects all three .closest('[data-streamdown="table-wrapper"]') call sites (copy dropdown, download dropdown, download button).
Version
streamdown@2.5.0 (latest).
Present since 2.4.0, when fullscreen tables were added (Full Screen Mode for tables #389). The 2.4.0 changelog states "Copy and download controls remain available in the fullscreen view", but they are non-functional.
Reproduction
Render <Streamdown> with a markdown table and table controls enabled (copy/download/fullscreen).
Click the expand/fullscreen button on the table.
In the fullscreen overlay, click Copy (any format) or Download → nothing is copied/downloaded (the onError path reports "Table not found").
Close fullscreen and use the same buttons on the inline table → they work.
Suggested fix
Broaden the lookup to also match the fullscreen container:
Summary
In a table's fullscreen view, the copy and download buttons do nothing. The same buttons work correctly on the inline table.
Root cause
TableCopyDropdown,TableDownloadDropdownandTableDownloadButtonlocate the table with:The fullscreen overlay is rendered with
createPortal(..., document.body)and its container is markeddata-streamdown="table-fullscreen"(nottable-wrapper). Because a portal detaches DOM ancestry, from inside the fullscreen overlayel.closest('[data-streamdown="table-wrapper"]')returnsnull, so every action hits the "Table not found" branch and silently no-ops.This affects all three
.closest('[data-streamdown="table-wrapper"]')call sites (copy dropdown, download dropdown, download button).Version
streamdown@2.5.0(latest).Reproduction
<Streamdown>with a markdown table and table controls enabled (copy/download/fullscreen).onErrorpath reports "Table not found").Suggested fix
Broaden the lookup to also match the fullscreen container:
Alternatively, pass the table element/ref into the fullscreen overlay instead of relying on DOM ancestry (which the portal breaks).