Closed
Bug 419808
Opened 18 years ago
Closed 17 years ago
Click inside contenteditable elements does not put the caret cursor at the clicked position but at the beginning of the element.
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla1.9
People
(Reporter: dpopa, Unassigned, NeedInfo)
References
Details
(Keywords: regression)
Attachments
(1 file)
3.04 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022604 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022604 Minefield/3.0b4pre ID:2008022604
Click inside contenteditable elements does not put the caret cursor at the clicked position but at the beginning of the element.
Reproducible: Always
Steps to Reproduce:
1.Have 2 contenteditable divs
2.click on the first div
3.click on the second div
Actual Results:
caret selection is placed at the beginning of the div
Expected Results:
caret selection is placed at the clicked location
Here's a JavaScript workaround: focus the DIV from inside the mousedown event handler
div.addEventListener('mousedown', function (event) {
//assume the link is direct child of the editable DIV
event.target.parentNode.focus();
}
Comment 2•18 years ago
|
||
Regression range is
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1200831420&maxdate=1200848459
so most likely from bug 390278.
Blocks: 390278
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Version: unspecified → Trunk
Comment 3•17 years ago
|
||
Fixed by the fix for bug 406596.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
This seems to be an issue in 45.0.2.
Clicking the content of a content-editable TD, the cursor is not always at the selectionStart or selectionEnd.
Flags: needinfo?(dpopa)
Comment 5•9 years ago
|
||
This seems to be an issue in 48.0 as well.
Setting draggable="false" on parent <a> anchor tag fixes it.
Comment 6•8 years ago
|
||
Still a problem in 58.0b3
Comment 7•6 years ago
|
||
this still a problem, in version 66.0.1
, demo: http://jsfiddle.net/WC9Fe/3/
You need to log in
before you can comment on or make changes to this bug.
Description
•