Changeset 623
- Timestamp:
- 2007-08-03 12:56:52 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckeditingarea.js
r621 r623 175 175 oDoc.body.removeAttribute( "disabled" ) ; 176 176 177 var delayedExec = function()178 {179 var range = oDoc.selection.createRange() ;180 range.moveEnd( "character", 1 ) ;181 range.select() ;182 range.collapse( true ) ;183 range.select() ;184 }185 setTimeout( delayedExec, 1 ) ;186 187 177 /* The following commands don't throw errors, but have no effect. 188 178 oDoc.execCommand( 'AutoDetect', false, false ) ; … … 274 264 // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653 275 265 if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() ) 276 // In IE it can happen that the document is in theory focused but the active element is outside it 277 this.Document.body.setActive() ; 266 this._EnsureFocusIE() ; 278 267 279 268 if ( FCKBrowserInfo.IsSafari ) … … 285 274 // In IE it can happen that the document is in theory focused but the active element is outside it 286 275 if ( FCKBrowserInfo.IsIE ) 287 this. Document.body.setActive() ;276 this._EnsureFocusIE() ; 288 277 } 289 278 } … … 298 287 } 299 288 catch(e) {} 289 } 290 291 FCKEditingArea.prototype._EnsureFocusIE = function() 292 { 293 // In IE it can happen that the document is in theory focused but the active element is outside it 294 this.Document.body.setActive() ; 295 296 // Kludge for #141... yet more code to workaround IE bugs 297 var range = this.Document.selection.createRange() ; 298 range.moveEnd( "character", 1 ) ; 299 range.select() ; 300 range.moveEnd( "character", -1 ) ; 301 range.select() ; 300 302 } 301 303