Skip to content

contenteditable with removed by user html nodes inside "if" block throws an error on update #5274

Open
@boatincow

Description

@boatincow

Describe the bug
If you have html nodes inside contenteditable block, which are wrapped with {#if}{/if} — removing that nodes will throw an error after update.

Logs
Uncaught (in promise) TypeError: Cannot read property 'removeChild' of null at detach at Array.forEach at HtmlTag.d at HtmlTag.p at Object.update [as p] at Object.update [as p] at update at flush

To Reproduce
That behavior is reproducible, here is REPL https://svelte.dev/repl/fa601199d8d345d3977bf48bdb8d14f4?version=3.24.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions