Editing a contenteditable div skips non-text elements when deleting.

NEW
Unassigned

Status

()

5 years ago
2 years ago

People

(Reporter: heath.borders, Unassigned)

Tracking

({reproducible})

34 Branch
ARM
Android
reproducible
Points:
---

Firefox Tracking Flags

(firefox34 affected)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Steps to reproduce:

On a page with the following content:

<html>
<head>
<title></title>
</head>
<body>

<div contenteditable="true">Editable <ul><li>1</li><li>2</li></ul> <table border="5"><tr><td>T</td></tr><tr><td>U</td></tr></table> <img src="http://www.politicususa.com/wp-content/uploads/Screen-shot-2010-11-02-at-8.34.01-PM2-1.jpg?cdn=no"> Content!</div>

</body>
</html>

I placed the cursor at the end of "Content!" and started deleting.


Actual results:

The cursor skipped over the <img> element without deleting it. It also deleted the contents of the <li> elements, but didn't delete the <li> elements themselves. It deleted the contents of the table cells, but not the table cells themselves.


Expected results:

When the cursor is next to an image, and I delete, the image should be deleted.
When the cursor is inside an empty <li> element and I delete, the <li> element should be deleted.
When the cursor is outside of a table, it should not go inside of the table when deleting. It should stop deleting at the edge of the table. When inside a table cell, it should stop deleting at the edge of the cell.

Basically, Firefox for Android should behave just like desktop Firefox.
(Reporter)

Updated

5 years ago
OS: Mac OS X → Android
Hardware: x86 → ARM
Version: Firefox 29 → Firefox 30
I reproduced this on my Nexus 5 (Android 4.4.4), w/Nightly (08/02), Google Keyboard.

JSFiddle: http://jsfiddle.net/9hj6z/
Status: UNCONFIRMED → NEW
status-firefox34: --- → affected
Ever confirmed: true
Keywords: reproducible
Version: Firefox 30 → Firefox 34
Duplicate of this bug: 1089125
You need to log in before you can comment on or make changes to this bug.