Closed Bug 546662 Opened 14 years ago Closed 13 years ago

inside contentEditable true SPAN can't use backspace or delete keys to erase text

Categories

(Core :: DOM: Editor, defect)

x86
Windows Vista
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 439808

People

(Reporter: mreichenbach, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)

When setting a SPAN element to contentEditable=true, the user can add text but can not delete using backspace or delete keys. The only way is to select it using the mouse or using shift + arrow keys. When changing the span element to div and setting display:inline the problem is fixed.

Reproducible: Always

Steps to Reproduce:
1.add <div>text:<span contentEditable=true>cant delete this</span></div>
2.try to erase text inside the span
Actual Results:  
The text can not be deleted using backspace or delete keys

Expected Results:  
The text shuld be deletable using the keys
Component: General → Editor
QA Contact: general → editor
Using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729) in XP home I can delete chars EXCEPT the last character in an inline contenteditable using DEL-key (backspace works) when I have entered the element by clicking. If I enter the element using arrow-keys, even the last char can be deleted.
if I add
<span contenteditable="true" onclick="this.blur()">
then I can delete even the rightmost character, even when clicking in.
I'm able to delete all chars except the last one in the provided example.
I have more examples. I'm not able to delete any char in the following:
1)
<p><span><span contenteditable="true">try to delete me</span></span></p>
2)
<pre><code><span contenteditable="true">try to delete me</span></code></pre>


I'm able to reproduce it on Windows and Linux:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.