# Why do I get a runtime error

**URL:** https://discourse.elm-lang.org/t/why-do-i-get-a-runtime-error/3243
**Category:** Learn
**Created:** [March 2, 2019, 11:24am UTC](https://discourse.elm-lang.org/t/why-do-i-get-a-runtime-error/3243 "2019-03-02T11:24:13Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![dmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dmy/32/702_2.png) [@dmy](https://discourse.elm-lang.org/u/dmy)
#### Post date: [March 13, 2019, 8:48am UTC](https://discourse.elm-lang.org/t/why-do-i-get-a-runtime-error/3243/7 "2019-03-13T08:48:56Z")

</div>

Elm Virtual Dom diffing algorithm tries to remove the `contentEditable` property by doing:

```auto
node.contentEditable = null;

```

which is not supported for `contentEditable`.

You can produce the same error by doing in a javascript console:

```auto
document.body.contentEditable = null

```

This is a known bug traced here: [bug #104](https://github.com/elm/virtual-dom/issues/104) (specifically [#81](https://github.com/elm/virtual-dom/issues/81))

I guess that the work-arounds are:

- use `attribute "contenteditable"` instead
- or set the property to `Encode.bool False` instead of removing it from your attributes
- or use `Html.Keyed` with a different identifier to force the `div` to be rebuilt

---

_[View the full topic](https://discourse.elm-lang.org/t/why-do-i-get-a-runtime-error/3243)._
