Ticket #1484 (closed Bug: worksforme)

Opened 10 months ago

Last modified 8 months ago

When a form has a element's name called "style",click "fullscreen" button will raise a error!

Reported by: ntmywzc Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5 Beta
Keywords: Pending WorksForMe Cc:

Description

When a form has a element's name called "style",click "fullscreen" button will raise a error! Version: 2.5 beta 16848, File: fckeditor\editor\_source\internals\fcktools.js, Error at line 457, Context:

FCKTools.ProtectFormStyles = function( formNode )
{
	if ( !formNode || formNode.nodeType != 1 || formNode.tagName.toLowerCase() != 'form' )
		return [] ;
	var hijackRecord = [] ;
	var hijackNames = [ 'style', 'className' ] ;
	for ( var i = 0 ; i < hijackNames.length ; i++ )
	{
		var name = hijackNames[i] ;
		if ( formNode.elements.namedItem( name ) )
		{
			var hijackNode = formNode.elements.namedItem( name ) ;
			hijackRecord.push( [ hijackNode, hijackNode.nextSibling ] ) ;
			formNode.removeChild( hijackNode ) ;
		}
	}
	return hijackRecord ;
}

a sample form:

<form method="POST" name="myform" action="addproduct.asp?action=save">
<input type="text" name="style" value="THIS ELEMENT WILL RAISE THE BUG!">
<textarea name="detail" id="detail" rows="20" cols="50">null...</textarea>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'detail' ) ;
oFCKeditor.BasePath	= '/fckeditor/' ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
</form>

Change History

Changed 10 months ago by alfonsoml

  • keywords Pending WorksForMe added; name="style",fullscreen removed
  • milestone deleted

I've tested with Firefox 2, IE6 and IE7 and they work fine. Safari also seems to work fine. Opera seems to have some error using the Fullscreen, but it's not pointing where does it happen and it also happens with the default content, so I don't know if it's related to this ticket at all.

Changed 8 months ago by alfonsoml

  • status changed from new to closed
  • resolution set to worksforme

Expired

Note: See TracTickets for help on using tickets.