We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
First - example: https://svelte.technology/repl?version=1.37.0&gist=77279f780755dcecd28eb8899a08e22d and working one: https://svelte.technology/repl?version=1.31.0&gist=77279f780755dcecd28eb8899a08e22d
it's happening because Svelte generates next code:
if_block = create_if_block( state, component ); if_block.create(); if_block.mount( modal._slotted.default, null );
but modal._slotted.default it's just empty fragment because in the _fragment you did:
if (slot_content_default) { appendNode(slot_content_default, div_1); }
then slot_content_default it is our modal._slotted.default .
Anyway, we can't mount to slot we should find existent dom element for that. Example with cycle "each" don't work at all: https://svelte.technology/repl?version=1.37.0&gist=70649b67d9f75bc91f3cc5c883b2c9e5
The text was updated successfully, but these errors were encountered:
Wraparound - add root div element around all "slot" content. It will be like:
if_block.mount( div, null );
Sorry, something went wrong.
use anchors for slotted content - fixes #822
975a974
Merge pull request #835 from sveltejs/gh-822
4776c41
use anchors for slotted content
This is fixed in 1.39.1 — thanks
Successfully merging a pull request may close this issue.
First - example:
https://svelte.technology/repl?version=1.37.0&gist=77279f780755dcecd28eb8899a08e22d
and working one:
https://svelte.technology/repl?version=1.31.0&gist=77279f780755dcecd28eb8899a08e22d
it's happening because Svelte generates next code:
but modal._slotted.default it's just empty fragment because in the _fragment you did:
then slot_content_default it is our modal._slotted.default .
Anyway, we can't mount to slot we should find existent dom element for that.
Example with cycle "each" don't work at all:
https://svelte.technology/repl?version=1.37.0&gist=70649b67d9f75bc91f3cc5c883b2c9e5
The text was updated successfully, but these errors were encountered: