Ticket #1633: 1633_2.patch
File 1633_2.patch, 5.4 KB (added by , 16 years ago) |
---|
-
_whatsnew.html
61 61 IE6 bug which causes floating dialogs to appear blank after opening it for the first time.</li> 62 62 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2136">#2136</a>] Fixed JavaScript error in IE 63 63 when opening the bullet list properties dialog.</li> 64 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1633">#1633</a>] External styles should no 65 longer interfere with the appearance of the editor and floating panels now.</li> 64 66 </ul> 65 67 <h3> 66 68 Version 2.6</h3> -
editor/_source/classes/fckeditingarea.js
97 97 var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ; 98 98 99 99 oIFrame.frameBorder = 0 ; 100 oIFrame. width = oIFrame.height = '100%' ;100 oIFrame.style.width = oIFrame.style.height = '100%' ; 101 101 102 102 if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE ) 103 103 { -
editor/_source/classes/fckpanel.js
66 66 else 67 67 { 68 68 var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ; 69 FCKTools.ResetStyles( oIFrame ); 69 70 oIFrame.src = 'javascript:void(0)' ; 70 71 oIFrame.allowTransparency = true ; 71 72 oIFrame.frameBorder = '0' ; 72 73 oIFrame.scrolling = 'no' ; 73 oIFrame. width = oIFrame.height = 0;74 oIFrame.style.width = oIFrame.style.height = '0px' ; 74 75 FCKDomTools.SetElementStyles( oIFrame, 75 76 { 76 77 position : 'absolute', … … 279 280 { 280 281 var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; 281 282 var iHeight = eMainNode.offsetHeight ; 282 me._IFrame. width = iWidth;283 me._IFrame. height = iHeight;283 me._IFrame.style.width = iWidth + 'px' ; 284 me._IFrame.style.height = iHeight + 'px' ; 284 285 285 286 }, 0 ) ; 286 287 … … 305 306 306 307 // It is better to set the sizes to 0, otherwise Firefox would have 307 308 // rendering problems. 308 this._IFrame. width = this._IFrame.height = 0;309 this._IFrame.style.width = this._IFrame.style.height = '0px' ; 309 310 310 311 this._IsOpened = false ; 311 312 -
editor/_source/internals/fck.js
1175 1175 FCK.Events.FireEvent( "OnFocus" ) ; 1176 1176 } 1177 1177 } 1178 1179 /* 1180 * #1633 : Protect the editor iframe from external styles. 1181 * Notice that we can't use FCKTools.ResetStyles here since FCKTools isn't 1182 * loaded yet. 1183 */ 1184 (function() 1185 { 1186 var el = window.frameElement ; 1187 var width = el.width ; 1188 var height = el.height ; 1189 if ( /^\d+$/.test( width ) ) width += 'px' ; 1190 if ( /^\d+$/.test( height ) ) height += 'px' ; 1191 var style = el.style ; 1192 style.border = style.padding = style.margin = 0 ; 1193 style.backgroundColor = 'transparent'; 1194 style.backgroundImage = 'none'; 1195 style.width = width ; 1196 style.height = height ; 1197 })() ; -
editor/_source/internals/fckdialog.js
75 75 } ) ; 76 76 } 77 77 78 var resetStyles = function( element )79 {80 element.style.cssText = 'margin:0;' +81 'padding:0;' +82 'border:0;' +83 'background-color:transparent;' +84 'background-image:none;' ;85 }86 87 78 return { 88 79 /** 89 80 * Opens a dialog window using the standard dialog template. … … 113 104 114 105 // Setup the IFRAME that will hold the dialog. 115 106 var dialog = topDocument.createElement( 'iframe' ) ; 116 resetStyles( dialog ) ;107 FCKTools.ResetStyles( dialog ) ; 117 108 dialog.src = FCKConfig.BasePath + 'fckdialog.html' ; 118 109 119 110 // Dummy URL for testing whether the code in fckdialog.js alone leaks memory. … … 179 170 { 180 171 // Setup the DIV that will be used to cover. 181 172 cover = topDocument.createElement( 'div' ) ; 182 resetStyles( cover ) ;173 FCKTools.ResetStyles( cover ) ; 183 174 FCKDomTools.SetElementStyles( cover, 184 175 { 185 176 'position' : 'absolute', … … 195 186 if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) 196 187 { 197 188 var iframe = topDocument.createElement( 'iframe' ) ; 198 resetStyles( iframe ) ;189 FCKTools.ResetStyles( iframe ) ; 199 190 iframe.hideFocus = true ; 200 191 iframe.frameBorder = 0 ; 201 192 iframe.src = FCKTools.GetVoidUrl() ; -
editor/_source/internals/fcktools.js
738 738 739 739 return "javascript: void(0);" ; // All other browsers. 740 740 } 741 742 FCKTools.ResetStyles = function( element ) 743 { 744 element.style.cssText = 'margin:0;' + 745 'padding:0;' + 746 'border:0;' + 747 'background-color:transparent;' + 748 'background-image:none;' ; 749 }