Ticket #2390: 2390_2.patch
File 2390_2.patch, 2.3 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
107 107 source logic for comments in IE.</li> 108 108 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2387">#2387</a>] Fixed JavaScript 109 109 with list commands when the editable document is selected with Ctrl-A.</li> 110 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2390">#2390</a>] Fixed the issue where 111 indent styles in JavaScript-generated <p> blocks are erased in IE.</li> 110 112 </ul> 111 113 <p> 112 114 <a href="_whatsnew_history.html">See previous versions history</a></p> -
editor/_source/internals/fckxhtml_ie.js
29 29 30 30 FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName ) 31 31 { 32 var aAttributes = htmlNode.attributes ; 32 var aAttributes = htmlNode.attributes, 33 bHasStyle ; 33 34 34 35 for ( var n = 0 ; n < aAttributes.length ; n++ ) 35 36 { … … 47 48 // attribute. It returns "null" for the nodeValue. 48 49 else if ( sAttName == 'style' ) 49 50 { 50 var data = FCKTools.ProtectFormStyles( htmlNode ) ;51 sAttValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase );52 FCKTools.RestoreFormStyles( htmlNode, data );51 // Just mark it to do it later in this function. 52 bHasStyle = true ; 53 continue ; 53 54 } 54 55 // There are two cases when the oAttribute.nodeValue must be used: 55 56 // - for the "class" attribute … … 80 81 this._AppendAttribute( node, sAttName, sAttValue || oAttribute.nodeValue ) ; 81 82 } 82 83 } 84 85 // IE loses the style attribute in JavaScript-created elements tags. (#2390) 86 if ( bHasStyle || htmlNode.style.cssText.length > 0 ) 87 { 88 var data = FCKTools.ProtectFormStyles( htmlNode ) ; 89 var sStyleValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase ) ; 90 FCKTools.RestoreFormStyles( htmlNode, data ) ; 91 this._AppendAttribute( node, 'style', sStyleValue ) ; 92 } 83 93 } 84 94 85 95 // On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)