Opened 15 years ago
Closed 13 years ago
#5375 closed Bug (fixed)
Cursor in the wrong position when you delete an Empty Paragraph
Reported by: | Satya Minnekanti | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | IBM Confirmed | Cc: | joek, Damian |
Description
To reproduce the defect
- Open Ajax sample and Type the text as shown below
This is a paragraph 1.
<empty paragraph>
This is a paragraph 2.
- If I put my cursor at the end of paragraph 1 and press the delete key, it deletes the empty paragraph as it should, but it moves the cursor to the beginning of paragraph 1.
Expected Result:
We believe the expected behavior is for the cursor to stay at the end of paragraph 1.
if the paragraph is not an empty paragraph, the cursor behavior is correct.
Attachments (1)
Change History (8)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added |
---|
Changed 15 years ago by
Attachment: | 5375.patch added |
---|
comment:2 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Owner: | set to Garry Yao |
Status: | new → assigned |
comment:3 Changed 15 years ago by
Keywords: | Review? removed |
---|---|
Milestone: | CKEditor 3.3 → CKEditor 3.x |
Version: | 3.2 → 3.0 |
This issue has been with us for a long time. I've confirmed it with CKEditor 3.0. No one has reported it until now, so it doesn't look like a drastic issue.
Because of this, and considering that this is a browser bug, I would instead wait for Mozilla to give us a position regarding the problem. I've opened the following issue at their side:
comment:4 Changed 15 years ago by
The test case provided in the mozilla bug report has different results inside CKEditor than without it.
This test case results in the cursor moving to the beginning of Line B. https://bug554886.bugzilla.mozilla.org/attachment.cgi?id=434839
In CKEditor the cursor goes to the beginning of Line A.
This is has become a more serious issue because we now have specific plugins that work on the contents and rely on more accurate cursor positioning. One of the side affects reported is that the following code:
editor.getSelection().getRanges()[0].startContainer
returns "body" instead of "paragraph" after the test case.
comment:6 Changed 13 years ago by
Cc: | joek,damo → joek, damo |
---|
This looks fixed now.Please close the defect
comment:7 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Confirmed with FF.