storybookjs/storybook

[Bug]: composition - CORS issues interactions addon

Open

#21.502 geöffnet am 9. März 2023

Auf GitHub ansehen
 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (10.058 Forks)batch import
bugcompositionhelp wantedsev:S3

Repository-Metriken

Stars
 (89.909 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 22h) (184 gemergte PRs in 30 T)

Beschreibung

Describe the bug

Reported by @yannbf during QA:

Composed stories that contain the play function execute the play function correctly, but the interactions panel shows “no interactions” because of the following error:

DOMException: Blocked a frame with origin "http://localhost:6007/" from accessing a cross-origin frame.
at new Instrumenter (http://localhost:6007/node_modules/.cache/.vite-storybook/deps/@storybook_addon-interactions_preview.js?v=56a43576:712:93)

It looks like the 7.0 instrumenter still uses the pattern or trying to access the parent's frame: https://github.com/storybookjs/storybook/blob/62ccd7ec53ca82ab46e78aad0b4b42f147dd02ef/code/lib/instrumenter/src/instrumenter.ts#L103

It should not do this, or we just accept / document that the interactions addon isn't composition compatible.

To Reproduce

No response

System

No response

Additional context

No response

Contributor Guide