Ticket #1659: 1659_9.patch
File 1659_9.patch, 1.8 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
406 406 } ); 407 407 } 408 408 409 // IE standard compliant in editing frame doesn't focus the editor when 410 // clicking outside actual content, manually apply the focus. (#1659) 411 if( CKEDITOR.env.ie 412 && domDocument.$.compatMode == 'CSS1Compat' ) 413 { 414 var htmlElement = domDocument.getDocumentElement(); 415 htmlElement.on( 'mousedown', function( evt ) 416 { 417 // Setting focus directly on editor doesn't work, we 418 // have to use here a temporary element to 'redirect' 419 // the focus. 420 if ( evt.data.getTarget().equals( htmlElement ) ) 421 ieFocusGrabber.focus(); 422 } ); 423 } 424 409 425 var focusTarget = ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) ? 410 426 domWindow : domDocument; 411 427 … … 633 649 // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189) 634 650 editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 ); 635 651 }); 636 } 652 653 // Create an invisible element to grab focus. 654 if( CKEDITOR.env.ie ) 655 { 656 var ieFocusGrabber; 657 editor.on( 'uiReady', function() 658 { 659 ieFocusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml( 660 '<input tabindex="-1" style="position:absolute; left:-10000">' ) ); 661 662 ieFocusGrabber.on( 'focus', function() 663 { 664 editor.focus(); 665 } ); 666 } ); 667 } 668 } 637 669 }); 638 670 639 671 // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)