Ticket #1792: 1792.patch
File 1792.patch, 2.9 KB (added by , 17 years ago) |
---|
-
_whatsnew.html
107 107 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1832">#1832</a>] Calling 108 108 FCK.InsertHtml() in non-IE browsers would now activate the document processor 109 109 as expected.</li> 110 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1792">#1792</a>] In IE, 111 the browser was able to enter in an infinite loop when working with multiple editors 112 in the same page. </li> 110 113 </ul> 111 114 <h3> 112 115 Version 2.6 Beta 1</h3> -
editor/_source/classes/fckeditingarea.js
300 300 { 301 301 if ( this.Mode == FCK_EDITMODE_WYSIWYG ) 302 302 { 303 // The following check is important to avoid IE entering in a focus loop. Ref:304 // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653305 if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() )306 this._EnsureFocusIE() ;307 308 this.Window.focus() ;309 310 // In IE it can happen that the document is in theory focused but the active element is outside it311 303 if ( FCKBrowserInfo.IsIE ) 312 this._EnsureFocusIE() ; 304 this._FocusIE() ; 305 else 306 this.Window.focus() ; 313 307 } 314 308 else 315 309 { … … 323 317 catch(e) {} 324 318 } 325 319 326 FCKEditingArea.prototype._ EnsureFocusIE = function()320 FCKEditingArea.prototype._FocusIE = function() 327 321 { 328 // In IE it can happen that the document is in theory focused but the active element is outside it 322 // In IE it can happen that the document is in theory focused but the 323 // active element is outside of it. 329 324 this.Document.body.setActive() ; 330 325 326 this.Window.focus() ; 327 331 328 // Kludge for #141... yet more code to workaround IE bugs 332 329 var range = this.Document.selection.createRange() ; 333 330 -
editor/_source/internals/fck.js
1145 1145 1146 1146 function FCKFocusManager_Win_OnFocus_Area() 1147 1147 { 1148 // Check if we are already focusing the editor (to avoid loops). 1149 if ( FCKFocusManager._IsFocusing ) 1150 return ; 1151 1152 FCKFocusManager._IsFocusing = true ; 1153 1148 1154 FCK.Focus() ; 1149 1155 FCKFocusManager_Win_OnFocus() ; 1156 1157 // The above FCK.Focus() call may trigger other focus related functions. 1158 // So, to avoid a loop, we delay the focusing mark removal, so it get 1159 // executed after all othre functions have been run. 1160 FCKTools.RunFunction( function() 1161 { 1162 delete FCKFocusManager._IsFocusing ; 1163 } ) ; 1150 1164 } 1151 1165 1152 1166 function FCKFocusManager_Win_OnFocus()