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] no root node for detached dom node #6570

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

tanhauhau
Copy link
Member

@tanhauhau tanhauhau commented Jul 25, 2021

Fixes #6567

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@baseballyama
Copy link
Member

baseballyama commented Jul 25, 2021

@tanhauhau

hi. This is just a curious question.
I'm happy if you answer my question🙏

I also tried to fix this issue but I couldn't reproduce the issue in my local environment.
So how did you reproduce it in your local environment?

(And also I could reproduce it on Codepen and Svelte REPL but in this case, I couldn't check behavior after fixing code by my knowledge...)

@Conduitry Conduitry merged commit 1952ea2 into sveltejs:master Jul 26, 2021
if ((root as ShadowRoot).host) {
return root as ShadowRoot;
}
return document;
Copy link
Contributor

@jacwright jacwright Aug 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks transitions/animations in iframes (see #3625). Please return ownerDocument, not document.

return node.ownerDocument;

Once fixed, you can close #6637 😄

jacwright added a commit that referenced this pull request Aug 24, 2021
Which is funny, because #6570 was fixing a regression as well, to do with detached dom nodes.
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.

Regression introduced in PR #5870
4 participants