Cannot select the table content in a contentEditable container

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
4 years ago
4 years ago

People

(Reporter: hammadi_naim, Unassigned)

Tracking

({testcase})

Trunk
x86_64
Windows 7
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8497388 [details]
Table selection bug.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

Steps to reproduce:

1- Add a table tag with some text on it to a contentEditable div

<div contenteditable="true">
<table style="table-layout: fixed; word-break: break-all; border-collapse: collapse; border: 0pt solid black; width: 16cm;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 0cm 0.19cm 0cm 0.19cm; vertical-align: top; width: 8cm; border: 1pt solid #000000;">
cell 1
</td>
<td style="padding: 0cm 0.19cm 0cm 0.19cm; vertical-align: top; width: 8cm; border: 1pt solid #000000;">
cell 2
</td>
</tr>
<tr>
<td style="padding: 0cm 0.19cm 0cm 0.19cm; vertical-align: top; width: 8cm; border: 1pt solid #000000;">
cell 3
</td>
<td style="padding: 0cm 0.19cm 0cm 0.19cm; vertical-align: top; width: 8cm; border: 1pt solid #000000;">
cell 4
</td>
</tr>
</tbody>
</table>
</div>

2- Using the mouse, try to select the whole table content starting from cell 1 to cell 4


Actual results:

- The table and its cells borders will be highlighted in blue and its content is not selected
- The selection object return invalid values:
var sel = document.getSelection();
sel.anchorNode ==> <tr> (the second table line)
sel.focusNode ==> <tr> (the second table line also)


Expected results:

- The whole text content will be highlighted in blue like all the other browsers
- The selection object must return these values:
sel.anchorNode ==> <tr> (the first table line)
sel.focusNode ==> <tr> (the second table line)

Updated

4 years ago
Component: Untriaged → Selection
Keywords: testcase
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.