Open Bug 908111 Opened 11 years ago Updated 2 years ago

Select all in h1 or span with contenteditable selects the element itself.

Categories

(Core :: DOM: Editor, defect)

23 Branch
x86
macOS
defect

Tracking

()

Tracking Status
firefox75 --- affected
firefox76 --- affected

People

(Reporter: antoinebrisseau, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130814063812

Steps to reproduce:

Steps to reproduce :
1. Go to http://jsfiddle.net/gtSa3/10/
2. In each contenteditable
3. Select all
4. Copy-Paste

Tested and reproduced in 23.0.1, 24.0b4 and 26.0a1


Actual results:

For h1 and span, the element is selected entirely and duplicating itself. For others like divs, it is working maybe because of this being fixed : https://bugzilla.mozilla.org/show_bug.cgi?id=562905


Expected results:

Only the text should be duplicated in the element.
Component: Untriaged → Editor
Product: Firefox → Core
See also bug 562905 and 583980. This a dupe?

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
Reproduced

<!-- Select all then copy-paste
The contenteditable is duplicating itself -->
<h1 contenteditable=""><h1 contenteditable="">I'm an h1</h1></h1>

<!-- same for others tags -->
<span contenteditable=""><span contenteditable="">I'm a span</span></span>

<!-- but working for divs and links -->
<div contenteditable="">I'm a div</div>

<a contenteditable=""><a contenteditable="">I'm a link</a></a>
- no it does not

ER only for <div>

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.