Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix height adjustment in ZoomElement in Safari
Problem, as described in [this thread](storybookjs#21138 (review)) affects stories rendered with custom elements using Shadow DOM. Such stories are affected if at the moment ZoomElement measures the height, component did not yet render its contents. Then, when component in a story renders content, it doesn't trigger MutationObserver (mutation callback is not called when Shadow DOM is altered). ResizeObserver is added next to MutationObserver (orignally added via storybookjs#15472), not replaces it, because MutationObserver is better supported by older browsers than ResizeObserver. Problem, as described in the original thread was mitigated by @JReinhold with storybookjs#21163, but even after that fix Safari is excluded from using native `zoom` and needs the fallback behavior.
- Loading branch information