Skip to content

Contenteditable receiving duplicate values #5805

@timwis

Description

@timwis

Version

2.3.3

Reproduction link

https://codepen.io/timwis/pen/YQKXBY

Steps to reproduce

Type something in the box below, click outside the area (to blur), and watch it appear double.

What is expected?

The editable div keeps what you typed in it.

What is actually happening?

The editable div adds what you typed in it assumedly as part of the virtual dom update, showing it twice.


My hunch is this is an issue with how virtual dom patches a <div contenteditable> that starts with an empty value. If you change its starting value in the demo to an actual value (like foo) this issue doesn't happen.

Related to #5234. Let me know if you prefer we keep the conversation there and we can close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions