Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(framework): Provide a workaround for Firefox 74 shadow root bug #1347

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

vladitasev
Copy link
Contributor

Firefox 74 seems to have a bug regarding shadow root creation. Even though attachShadow is called in the constructor, this.shadowRoot is still null in connectedCallback. If you try to create it again there, it fails, as it was already created, it's just not available yet. Therefore with managedSlots: true it works, as there is async work going on, and the shadowRoot is ready when rendering.

The fix is to await a microtask, if there is no shadow root in connectedCallback and needsShadowRoot is equal to true.

@vladitasev vladitasev merged commit 7cc67a7 into master Mar 25, 2020
@vladitasev vladitasev deleted the ff74-fix branch March 25, 2020 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants