Open
Bug 365900
Opened 18 years ago
Updated 4 years ago
wrong focusNode/anchorNode for focused elements inside table
Categories
(Core :: DOM: Selection, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: surkov, Unassigned)
Details
Attachments
(1 file)
730 bytes,
application/xhtml+xml
|
Details |
If focusable element is placed inside html:table and the element becomes focused then window.getSelection().focusNode/anchorNode returns either row or cell of table. focusNode/anchorNode should return focused element.
Comment 1•17 years ago
|
||
This sounds a lot like bug 336936.
Updated•15 years ago
|
Assignee: selection → nobody
QA Contact: selection
I have encountered this bug, and found that it occurs when <body contenteditable="true"> and the table cell contains an empty element that has an attribute declared, i.e. occurs for <td><span style="text-align:center;"></span></td> not <td><span></span></td>. Tested on 43.0.4 on Mac OSX Yosemite.
Sample HTML to recreate the issue:
<!doctype html>
<html>
<head>
<title>Firefox Seleciton Bug</title>
<style>
table {
width:75%;
margin: 10px auto;
border: 1px solid #ccc
}
td {
border: 1px solid #ccc;
width: 50%;
}
</style>
</head>
<body contenteditable="true">
<h1>Firefox Selection Bug</h1>
<table>
<tr>
<td><span style="text-align:center;"></span></td>
<td><span style="text-align:center;">contented</span></td>
</tr>
</table>
<script>
var tds = document.querySelectorAll('td');
for (var i = 0; i < tds.length; i++) {
tds[i].addEventListener('click', function(){
console.log(window.getSelection());
});
}
</script>
</body>
</html>
Comment 3•4 years ago
|
||
Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.
If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.
Severity: normal → S4
Priority: -- → P5
You need to log in
before you can comment on or make changes to this bug.
Description
•