contenteditable DOM element removed after Ctrl+A and Delete

Confirmed Issue #12765765 • Assigned to Grisha L.

Details

Author
Tomasz K.
Created
Jul 14, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
15.15063
Reports
Reported by 3 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
</span>

Other browsers just remove contents but not entire element.

Attachments

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:

      foo
      bar

      inserting caret before bar and pressing backspace will remove the node

    • forgot to add the CODE tags:

      foo

      bar

    • 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.

      Fiddle:
      https://jsfiddle.net/jfgcnye1/4/

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

    Sign in