-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Text Duplication on contenteditable on svelte:element #17969
Copy link
Copy link
Open
Description
Describe the bug
I am getting this weird text duplication on contenteditable on svelte:elements. It's a bit hard to explain but i managed to build a reproduction, which should explain the error.
I initially though this was fixed in: #17853
But the issue still persists in 5.54.0
Reproduction
The reproduction has a svelte:element and a button to enable editing on the svelte element.
(IIRC contenteditable cannot be dynamic, therefore the if is needed, if this has been made possible in an update please let me know)
As long as there is some text content present the bug does not occur and one can edit the text as he pleases.
To reproduce the bug you have to do the following steps:
- Enable Edit using the button
- Remove all text from the svelte:element (if not all text is removed the bug will not occur)
- Disable Edit
- Reenable Edit
- Start typing something
- See that text follows correctly in the inspect but visually the text is duplicated
https://svelte.dev/playground/61c8e36e179a4a5aad34d3736e919ee9?version=latest
Logs
System Info
Svelte version: 5.54.0Severity
annoyance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels