Opened 10 years ago

Closed 10 years ago

#2667 closed Bug (duplicate)

DocTypeDeclaration fck_docprops.html

Reported by: mardiros Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.3
Keywords: HasPatch Pending Cc:

Description

When using the document property,
the doctype declaration does not work very well.
It is not loaded when using firefox and loaded as other on IE7.

The problem is that a value is use for a select, instead of the selectedIndex.
( And the comparaison must be case-insensitive ???).

Here is a patch

Index: editor/dialog/fck_docprops.html
===================================================================
--- editor/dialog/fck_docprops.html	(revision 2374)
+++ editor/dialog/fck_docprops.html	(working copy)
@@ -204,9 +204,18 @@
 	}
 
 	// Document Type.
+	
 	if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 )
 	{
-		GetE('selDocType').value = FCK.DocTypeDeclaration ;
+		var selDocType = GetE('selDocType'); 
+		var dtd = FCK.DocTypeDeclaration.toString().toUpperCase();
+		for ( var i = 0; i < selDocType.options.length; i++ ) {
+			if ( selDocType.options[i].value.toUpperCase() == dtd ) {
+			 selDocType.selectedIndex = i;
+			 break;
+			}
+		}
+		
 
 		if ( GetE('selDocType').selectedIndex == -1 )
 		{

Change History (3)

comment:1 Changed 10 years ago by Artur Formella

Keywords: HasPatch added

comment:2 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Keywords: Pending added

I can't reproduce with the current nightly in FF3.5 or IE8.

Maybe the change in #3427 have fixed this?

comment:3 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Resolution: duplicate
Status: newclosed

dup of #3427

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy