-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: ensure correct each block element is moved during reconcilation #12182
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
Conversation
🦋 Changeset detectedLatest commit: 1488aea The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This definitely doesn't look right to me. The parent/child relationships aren't relevant here — in the test, if the Ultimately I think what we need here is some version of #11690. Here's an idea that I haven't had the opportunity to test yet: each effect's function get_first_node(effect) {
return effect.d ?? effect.first && get_first_node(effect.first);
} There's no property for the end of its DOM range because that's just If an effect has a template like this... var root = $.template(`<span></span> <!>`); ...then we call -$.append($$anchor, fragment);
+$.append($$anchor, fragment, true); ...but if it's like this... var root = $.template(`<!> <span></span>`); ...then we do the opposite: $.append($$anchor, fragment, false); I'm sure I'm missing something here but it feels like this should work. |
I was playing around with this idea. However, by not putting in the anchor nodes into the I really wish we could reliably use a element container here instead with display contents. Update: I found the culprit here, and it seems we can apply a much simpler fix. The root cause was that when we put things in the I did notice that, even before this PR, that we insert hydrated nodes in |
d30a1d3
to
4189b3a
Compare
4189b3a
to
0a21145
Compare
Merged #12215 so will close this |
Fixes #12177 and fixes #12198