-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
bug with svelte:element and style:property #9361
Comments
BONUS BUG, which goes in the same direction: With this change, is is possible to see many "active" Items (which should never happen). |
This comment was marked as spam.
This comment was marked as spam.
Another example, which is easier to understand - but for style https://svelte.dev/repl/6b28fb067e0d40dc8dea6d1c77d9ae53?version=4.2.8 click button slow = OK This bug does not exist in Svelte 5! What is wrong? |
Fixed in Svelte 5, therefore closing |
Describe the bug
A strange error that was difficult to locate. Probably this is a deep bug in svelte and reactivity. It is a constellation with svelte:element and style:property.
REPL example shows a menu.
https://svelte.dev/repl/1419e245a8e84ef4bfcfada6d3b7a416?version=4.2.2
If "Menu2" or "Menu3" is slowly expanded, then everything works correctly. e.g. a click on "Submenu" works.
But if the Menu is quickly collapsed first and then quickly expanded, then something breaks. If you click on Submenu, the padding disappears.
It turns out that "style:padding-left" doesn't work anymore in this case.
I have found several workarounds, all of which can fix the problem - however, I don't see any logic or connection to each other.
remove {style} in NavigationItem.svelte
and now it works like expected
https://svelte.dev/repl/de9b9a81d7db4ee9b48ba25805d3e287?version=4.2.2
replace svelte:element in NavigationItem.svelte with div
and now it works like expected
https://svelte.dev/repl/b747e79d8ff24ad9a31b19ba8a74f39d?version=4.2.2
delete NavigationText.svelte and add simple {text} in NavigationItem.svelte
and now it works like expected
https://svelte.dev/repl/dcf6aa8270cc4285a5b53a14c40783f8?version=4.2.2
Reproduction
https://svelte.dev/repl/1419e245a8e84ef4bfcfada6d3b7a416?version=4.2.2
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: