Ticket #2263: 2263.patch
File 2263.patch, 3.1 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
42 42 <p> 43 43 Fixed Bugs:</p> 44 44 <ul> 45 <li></li> 45 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2263">#2263</a>] Fixed a JavaScript 46 error in IE which occurs when there are placeholder elements in the document and the user 47 has pressed the Source button.</li> 46 48 </ul> 47 49 <p> 48 50 <a href="_whatsnew_history.html">See previous versions history</a></p> -
editor/_source/internals/fck.js
631 631 632 632 var sHtml ; 633 633 634 // Update the HTML in the view output to show. 634 // Update the HTML in the view output to show, also update 635 // FCKTempBin for IE to avoid #2263. 635 636 if ( bIsWysiwyg ) 636 637 { 637 638 FCKCommands.GetCommand( 'ShowBlocks' ).SaveState() ; … … 640 641 641 642 sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ; 642 643 644 if ( FCKBrowserInfo.IsIE ) 645 FCKTempBin.ToHtml() ; 646 643 647 if ( sHtml == null ) 644 648 return false ; 645 649 } … … 937 941 FCK.EditorWindow = FCK.EditingArea.Window ; 938 942 FCK.EditorDocument = FCK.EditingArea.Document ; 939 943 944 if ( FCKBrowserInfo.IsIE ) 945 FCKTempBin.ToElements() ; 946 940 947 FCK.InitializeBehaviors() ; 941 948 942 949 // Listen for mousedown and mouseup events for tracking drag and drops. … … 1089 1096 while ( i < this.Elements.length ) 1090 1097 this.Elements[ i++ ] = null ; 1091 1098 this.Elements.length = 0 ; 1099 }, 1100 1101 ToHtml : function() 1102 { 1103 for ( var i = 0 ; i < this.Elements.length ; i++ ) 1104 this.Elements[i] = this.Elements[i].outerHTML ; 1105 }, 1106 1107 ToElements : function() 1108 { 1109 var node = FCK.EditorDocument.createElement( 'div' ) ; 1110 for ( var i = 0 ; i < this.Elements.length ; i++ ) 1111 { 1112 if ( typeof( this.Elements[i] ) == 'string' ) 1113 { 1114 node.innerHTML = this.Elements[i] ; 1115 this.Elements[i] = node.firstChild ; 1116 } 1117 } 1092 1118 } 1093 1119 } ; 1094 1120 -
editor/dialog/fck_anchor.html
121 121 if ( aNewAnchors.length == 0 ) 122 122 { 123 123 // Nothing was selected, so now just create a normal A 124 aNewAnchors.push( oEditor.FCK.InsertElement( 'a' ) ) ; 124 if ( FCKBrowserInfo.IsIE ) 125 aNewAnchors.push( oEditor.FCK.InsertElement( '<a name="' + FCKTools.HTMLEncode( sNewName ).replace( '"', '"' ) + '">' ) ) ; 126 else 127 { 128 var n ; 129 aNewAnchors.push( ( n = oEditor.FCK.InsertElement( 'a' ), n.name = sNewName, n ) ) ; 130 } 125 131 } 126 132 else 127 133 { … … 135 141 { 136 142 oAnchor = aNewAnchors[i] ; 137 143 138 // Set the name139 oAnchor.name = sNewName ;140 141 144 // IE does require special processing to show the Anchor's image 142 145 // Opera doesn't allow to select empty anchors 143 146 if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera )