question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 <div contenteditable="true" bind-value-oninput="@contentEditableText"> You can Edit this Text </div> @contentEditableText @functions { string contentEditableText = "You can Edit this Text"; }
  3. 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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:39
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

23reactions
SteveSandersonMScommented, May 7, 2019

Reopening in case this is something we choose to address in the future.

18reactions
Andrzej-Wcommented, Sep 28, 2022

Based on the number of thumbs up I think a lot of people (including me) are interested in this feature. What should we do to prioritize this work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor: bind-value-oninput or bind does not work with ...
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 ......
Read more >
Blazor: bind-value-oninput or bind does not work with ...
4. As I Type something in the editable div, I need to see the same reflected in the body, but it does not...
Read more >
onchange - HTML contenteditable binding support in Blazor
There is a bug open of this here and there is no support of bind with content editable. i try EislerDavid answer using...
Read more >
Binding contentEditable div in UI for ASP.NET MVC
I have some divs in my page that have the contentEditable attribute. How can I update the viewmodel when the user changes the...
Read more >
contenteditable - HTML: HyperText Markup Language | MDN
The contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found