Opened 17 years ago
Closed 17 years ago
#3146 closed Bug (fixed)
Insert link incorrect within table cell
| 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.
Attachments (1)
Change History (7)
comment:1 Changed 17 years ago by
comment:2 Changed 17 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 17 years ago by
| Owner: | set to Martin Kou |
|---|---|
| Status: | new → assigned |
Changed 17 years ago by
| Attachment: | 3146.patch added |
|---|
comment:4 Changed 17 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.
comment:5 Changed 17 years ago by
| Keywords: | Review+ added; Review? removed |
|---|
Please remove the lastParent.type == CKEDITOR.NODE_ELEMENT check, as getParent will only return element type objects.
comment:6 Changed 17 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Click here for more info about our SVN system.

Same thing happens for list items.
Reproducing Procedures