dotnet / dotnet/aspnetcore

Blazor: bind-value-oninput or bind does not work with contenteditable divs

Open
#9,974 24 comments 70 reactions 2 assignees Claimed by @dariatiurina View on GitHub
area-blazor enhancement feature-blazor-component-model feature-razor.language help wanted on-roadmap Pillar: Complete Blazor Web
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### `bind-value-oninput` or `bind` does not work with `contenteditable` divs

### Bug Description
In the below code, the expectation is as and when I edit the div content I need to update the model so that I can then save it back to Database.

### To Reproduce
Steps to reproduce the behavior:
1. Using the latest preview version of ASP.NET Core 3
2. Run the below code
`

`
`You can Edit this Text`
`
`
` @contentEditableText`
`@functions {
string contentEditableText = "You can Edit this Text";
}`
4. As I Type something in the editable div, I need to see the same reflected in the body, but it does not happen that way. The OnChange event does not fire automatically.

### Expected behavior
OnChange Event needs to fire and changes in editable div should be bound to the model.

### Screenshots
Screen Shot 2019-05-04 at 2 01 06 PM
Screen Shot 2019-05-04 at 2 02 50 PM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.