Opened 16 years ago
Last modified 16 years ago
#3146 closed Bug
Insert link incorrect within table cell — at Version 4
Reported by: | Garry Yao | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | CKEditor 3.0 |
Component: | Core : Styles | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed Review+ | Cc: |
Description (last modified by )
Reproducing Procedures
- Open the replace by code example page;
- Make document content and selection as following by double click on cell:
<table> <tbody> <tr> <td>^ text^</td> </tr> </tbody> </table>
- Open link dialog to insert a default link.
- Actual Result : The link is not inserted at all.
Additional information: This is actually a style system bug. The same thing happens if you press the bold button or try to apply any inline style with the HTML and selection above.
Change History (5)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Priority: | Normal → High |
WFM with the table case, but it is buggy with the list example.
comment:3 Changed 16 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
Changed 16 years ago by
Attachment: | 3146.patch added |
---|
comment:4 Changed 16 years ago by
Component: | General → Core : Styles |
---|---|
Description: | modified (diff) |
Keywords: | Review? added |
The problem actually lies in the style system, in the applyInlineStyle() function. You can see the same bug with the same HTML and the same selection by pressing the bold button - nothing happens.
What happened in the applyInlineStyle() function is that the calculation of firstNode and lastNode in line 280, 281 is wrong. The lastNode calculated from there actually comes before the firstNode (you can verify by printing out their getAddress() output). We already have a more well tested way in CKEDITOR.dom.range::getBoundaryNodes() to do the same thing, so that function should be used instead.
Same thing happens for list items.
Reproducing Procedures