Skip to content

Svelte 5: Error on <element bind:innerHTML={...} contenteditable> #10559

Closed
@brunnerh

Description

@brunnerh

Describe the bug

contenteditable or contenteditable="" is equivalent to "true" according to the spec.

contenteditable errors with a confusing message:

'contenteditable' attribute cannot be dynamic if element uses two-way binding

contenteditable="" does not cause errors.

Reproduction

<script>
	let value = 'Text';
</script>
<div bind:innerHTML={value} contenteditable />
<p>Bound HTML: {value}</p>

REPL

Logs

No response

System Info

REPL - Svelte v5.0.0-next.60

Severity

annoyance

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions