Index: /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js
===================================================================
--- /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js	(revision 767)
+++ /FCKeditor/branches/features/style/editor/_source/classes/fckstyle.js	(revision 768)
@@ -316,8 +316,8 @@
 			for ( var i = 0 ; i < attribs.length ; i++ )
 			{
-				var attName = attributes[i][0] ;
+				var attName = attribs[i][0] ;
 				if ( FCKDomTools.HasAttribute( element, attName ) )
 				{
-					var attValue = attributes[i][1] ;
+					var attValue = attribs[i][1] ;
 
 					// Remove the attribute if:
@@ -742,6 +742,20 @@
 
 		if ( range.CheckIsCollapsed() )
+		{
+			// The following doesn't work.
+//			var collapsedElement = this.BuildElement( range.Window.document ) ;
+//			range.InsertNode( collapsedElement ) ;
+//			range.MoveToNodeContents( collapsedElement ) ;
+//			range.Select() ;
+
+			// An idea would be calling a standard execCommand for formatting
+			// and wait "after" a keystroke or paste. Then, if the formatting
+			// tag exists and has contents, replace it with the real element.
+			// range.Window.document.execCommand( 'FontName', false, '__FCKeditorTemp' ) ;
+			
+			// For now, we do nothing for collapsed selections.
 			return ;
-
+		}
+		
 		var elementName = this.Element ;
 
