contenteditable DOM element removed after Ctrl+A and Delete

Confirmed Issue #12765765 • Assigned to Amit J.


Tomasz K.
Jul 14, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 6 people

Sign in to watch or report this issue.

Steps to reproduce

There is an error in Microsoft Edge 15 with contenteditable element. When I select whole text and then remove it pressing i.e. backspace key, it removes whole DOM node.

Example code:

<span contenteditable="true">
  Focus on me -> Ctrl + A -> Backspace

Other browsers just remove contents but not entire element.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Grisha L.”

      Changed Status to “Confirmed”

    • I also observe this issue for elements. my code:


      inserting caret before bar and pressing backspace will remove the node

    • forgot to add the CODE tags:



    • my code was using DIV elements with contenteditable, with OL and LI tags nested in the DIV.

    • Seems to occur only for inline elements, not with display: block.
      Also, without selecting all by Ctrl-A or dragging, if you just repeatedly hit backspace the first character won’t delete.


    • Microsoft Edge Team

      Changed Assigned To from “Grisha L.” to “Amit J.”

    • I am experiencing this too.
      Display inline on contenteditable fails completely if i ctrl+a then backspace.

      inline-block works a little bit better, but the same procedure make the cursor lose focus from the span dom, forcing the user to re-click the dom. Also if you backspace too much, the blinking text cursor appears on the end of the dom with no ability to write anything. Also you cant drag-select text.

      Display block works the best, but that’s just not very helpful when trying to style editable doms a certain way.

    • I forgot to add. These are the version numbers from my edge browser:
      Microsoft Edge 42.17134.1.0
      Microsoft EdgeHTML 17.17134

    You need to sign in to your Microsoft account to add a comment.

    Sign in