Opened 18 years ago
Closed 17 years ago
#1752 closed Bug (fixed)
E.tagName has no properties when using tablecommands plugin.
| Reported by: | Keith Pitt | Owned by: | Artur Formella |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6.4 |
| Component: | General | Version: | FCKeditor 2.4 |
| Keywords: | Confirmed Review+ | Cc: |
Description
You get an error when trying to make text bold in a table when you have the "tablecommands" plugin installed.
E.tagName has no properties
FCKEvents(undefined, undefined) ApplyStyle(Object Element=b _StyleDesc=Object IsCore=true GetType_$=1) FCKCoreStyleCommand() FCKToolbarButton() FCKToolbarButtonUI_OnClick(click clientX=0, clientY=0, Object Name=Bold Label=Bold Tooltip=Bold Style=0 State=0) CancelEvent(click clientX=0, clientY=0)
Attachments (3)
Change History (10)
Changed 17 years ago by
| Attachment: | 1752.patch added |
|---|
comment:1 Changed 17 years ago by
| Keywords: | Confirmed Review? added |
|---|---|
| Version: | FCKeditor 2.5.1 → FCKeditor 2.4 |
comment:2 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The proposed patch fixes the problem, but there a few things to keep attention:
- Ok, you are filtering now all ( nodeType == 3 ) nodes... but "if ( oCell.tagName..." is actually looking for ( nodeType == 1 ) stuff. What about potential nodeType that are not 3 or 1? So, instead of filtering the buggy part, the more correct and simple approach is simply going right to the point, by doing "if ( oCell.nodeType == 1 && oCell.tagName...".
- The patch should also contain the changelog entry for it.
- A small detail... the coding style should follow our standards.
Changed 17 years ago by
| Attachment: | 1752_2.patch added |
|---|
comment:3 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|
comment:4 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
wouldn't it work to just use
oCell.nodeName.Equals( 'TD', 'TH' )
?
(I'm asking that question, just searching for a patch even better)
Changed 17 years ago by
| Attachment: | 1752_3.patch added |
|---|
comment:5 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Owner: | set to Artur Formella |
| Status: | new → assigned |
You're right, it is better solution.
comment:6 Changed 17 years ago by
| Keywords: | Review+ added; Review? removed |
|---|---|
| Milestone: | → FCKeditor 2.6.4 |

Steps to reproduce:
add 'TableHorizontalSplitCell' to default toolbar
2.Paste in source mode:
<p> </p> <table width="200" cellspacing="1" cellpadding="1" border="1"> <tbody> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>11111</td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table>3.Back to WYSIWIG
4.Click 11111
5.Click Bold. In FF3 (Vista32) you get an error:
I attached a simple solution.