storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.83k stars 9.34k forks source link

Mutation Observer childList is not detected #18043

Open deerawan opened 2 years ago

deerawan commented 2 years ago

Describe the bug Mutation Observer childList is not detected on Storybook.

This is for index.html that specifies the component. See that mutations log exists

Image 2022-04-25 at 13 33 55

Below is Storybook, no mutations log displayed

Image 2022-04-25 at 13 34 07@2x

To Reproduce It's reproducible in this repo https://github.com/deerawan/mutation-observer-storybook

Important files:

System

System:
    OS: macOS 12.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 14.17.0 - ~/.asdf/installs/nodejs/14.17.0/bin/node
    Yarn: 1.22.18 - ~/.asdf/installs/nodejs/14.17.0/.npm/bin/yarn
    npm: 6.14.13 - ~/.asdf/installs/nodejs/14.17.0/bin/npm
  Browsers:
    Chrome: 100.0.4896.127
    Firefox: 99.0.1
    Safari: 15.2
  npmPackages:
    @storybook/addon-actions: ^6.4.22 => 6.4.22 
    @storybook/addon-essentials: ^6.4.22 => 6.4.22 
    @storybook/addon-links: ^6.4.22 => 6.4.22 
    @storybook/web-components: ^6.4.22 => 6.4.22 
snortblt commented 1 year ago

Seeing this too

shilman commented 1 year ago

Is this still an issue on 7.0?

Migration guide: https://storybook.js.org/migration-guides/7.0

ahuangServicenow commented 1 year ago

I believe this is still the case for 7.0. I guess the mutationObserver basically cannot observe the element in iframe? is there a way we can disable the iframe in preview?