Ticket #6192: 6192_3.patch
File 6192_3.patch, 1.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
616 616 editor.focusManager.blur(); 617 617 }); 618 618 619 var wasFocused; 620 619 621 domWindow.on( 'focus', function() 620 622 { 621 623 var doc = editor.document; … … 624 626 blinkCursor(); 625 627 else if ( CKEDITOR.env.opera ) 626 628 doc.getBody().focus(); 629 else if ( CKEDITOR.env.webkit ) 630 { 631 if ( !wasFocused ) 632 { 633 editor.document.getDocumentElement().focus(); 634 wasFocused = 1; 627 635 636 // Webkit does not scroll to the cursor position after first focus (#6192) 637 setTimeout(function() 638 { 639 doc.$.execCommand( 'inserthtml', false, '<span id="cke_focus_marker" cke_temp="1"></span>' ); 640 var marker = doc.getById( 'cke_focus_marker' ); 641 marker.scrollIntoView(); 642 marker.remove(); 643 }, 0 ); 644 } 645 } 646 628 647 editor.focusManager.focus(); 629 648 }); 630 649