Opened 17 years ago

Closed 17 years ago

#640 closed Bug (fixed)

Apply style to 2 or more table cells generates JS error

Reported by: mardoek@… Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version:
Keywords: SF Cc: Frederico Caldeira Knabben

Description (last modified by Martin Kou)

When you select 2 or more cells and apply a style to it generates a error on the line:

67 of fck_actions.js
oTextRange.pasteHTML( oFont.outerHTML ) ;

It can be fixed, when you change the if statement above to: But this part of the IF-Statement is removed, I don't know the use of it:

oFirstChild.outerHTML == oFont.innerHTML &&

Code:

if (oFirstChild.nodeType == 1 && (oFirstChild.tagName == "SPAN"
			|| oFirstChild.tagName == "FONT"
			|| oFirstChild.tagName == "P"
			|| oFirstChild.tagName == "DIV"
			|| oFirstChild.tagName == "TABLE" //Added For the support of tables..
			|| oFirstChild.tagName == "TR"
			|| oFirstChild.tagName == "TD")) //Added For the support of tables..
{
	oParent.className =
		command.value ;
}
else
{
	oFont.className = command.value ;
	oTextRange.pasteHTML( oFont.outerHTML ) ;
}

Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=780078&group_id=75348&atid=543653

Change History (3)

comment:1 Changed 17 years ago by Martin Kou

Description: modified (diff)
Reporter: changed from Martin Kou to mardoek@…

I know it is quite an old issue. I believe today we have a different issue, but there are still problems when applying styles in many cells.

I'm marking this bug to [SS] (Style Selector) as we will be working on it for the 2.5.


Moved from SF. Original poster: fredck

comment:2 Changed 17 years ago by Martin Kou

Description: modified (diff)

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5
Resolution: fixed
Status: newclosed
Summary: [SS] Apply style to 2 or more table cells generates JS errorApply style to 2 or more table cells generates JS error

This problem has been completely fixed on IE. For Firefox, the style is applied to the first selection only, due to the way multiple cells get selected on it. No JavaScript errors are thrown anymore though.

As we have a completely different situation than the reported here, I've created #1345 for this specific FF issue.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy