Opened 15 years ago
Closed 15 years ago
#3829 closed Bug (fixed)
Links do not get deleted correctly
Reported by: | Damian | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | IBM Confirmed Review+ | Cc: |
Description
To reproduce:
- Open sample
- Add a word
- Select the word and create a link from it using the link dialog
- Goto source to see the link is created and return to RT mode
- Select the new link and delete it.
- Goto source again, see that that label of the link is gone but the <a> is still there.
Expected result: After deleting the link the <a> should also be deleted.
Attachments (2)
Change History (15)
comment:1 Changed 15 years ago by
Keywords: | WorksForMe added |
---|
Changed 15 years ago by
Attachment: | DeleteLinkExample.png added |
---|
comment:2 Changed 15 years ago by
The link is deleted by selecting the link text and pressing the delete key.
I've repeated this on the nightly build. Attaching a screen shot to illustrate.
comment:3 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The link deletion logic with keystroke is browser implicit, you need to
- IE:
- Press N+1 Backspace at the end of link text;
- Press N Del at beginning of link text;
- FF:
- Press N+1 Backspace at the end of link text;
- Press N+1 Del at the beginning of link text;
- Safari: Press exactly N times with both Backspace and Del
Where N represent the text count of your link.
Sorry, we're not likely to fix the problem at this moment, hopefully above info is helpful to you.
comment:4 Changed 15 years ago by
Keywords: | Confirmed added; WorksForMe removed |
---|
comment:5 Changed 15 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
I also find this one quite strange.
The fact is that, during the editor usage, we could have some empty <a> being left in the DOM, due to the implicit browser behavior to some operations. This link deletion is a case. In V2, we simply cleanup empty <a> (with no "name" attribute), but it looks like this is not happening with V3. We could simply implement the same cleanup rule here.
Note that the attached screenshot precisely shows that there is also a <br> inside the link, and in that case it's correct to not have the link deleted because the <br> has not been selected before deletion.
In any case, I'm able to confirm this one, with IE only though, even without the <br>:
- Load the following HTML:
<p><a href="http://example.com">Test</a></p>
- Double click on "Test" to select it.
- Hit DEL to delete it.
- Switch back to source. You will have the following, which is wrong:
<p> <a href="http://example.com"></a></p>
comment:6 Changed 15 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | reopened → new |
Changed 15 years ago by
Attachment: | 3829.patch added |
---|
comment:7 follow-up: 9 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Status: | new → assigned |
- The patch is including the latest patch at #3789 for easy reviewing;
- The empty paragraph removing logic is not respected after remove the empty link is out the scope of this ticket.
comment:8 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
#3789, so please attention when applying the patch.
comment:9 Changed 15 years ago by
Replying to garry.yao:
- The empty paragraph removing logic is not respected after remove the empty link is out the scope of this ticket.
Please open a ticket for it (for the 3.1).
comment:10 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 follow-up: 13 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'm not sure what part of this defect is fixed and what remains to be fixed still? I can reproduce this issue as described in the original problem description.
comment:12 Changed 15 years ago by
The subject of this fix is removing the empty <a> element unless it represent an anchor.
WFM, could you provide more details?
comment:13 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to damo:
I'm not sure what part of this defect is fixed and what remains to be fixed still? I can reproduce this issue as described in the original problem description.
Please check the third paragraph in my previous comment ("Note that...").
Can you provide details about how the link is deleted in step 5?