Ticket #42530: 42530.diff
File 42530.diff, 1.0 KB (added by , 7 years ago) |
---|
-
src/wp-admin/js/editor.js
635 635 selectionPosition = TinyMCEContentAreaTop + elementTop, 636 636 visibleAreaHeight = windowHeight - ( edToolsHeight + toolbarHeight ); 637 637 638 if ( selectionPosition < visibleAreaHeight ) { 639 return; 640 } 638 641 /** 639 642 * The minimum scroll height should be to the top of the editor, to offer a consistent 640 643 * experience. … … 854 857 if ( textArea.focus ) { 855 858 // focus and scroll to the position 856 859 setTimeout( function() { 860 textArea.setSelectionRange( start, end ); 857 861 if ( textArea.blur ) { 858 862 // defocus before focusing 859 863 textArea.blur(); 860 864 } 861 865 textArea.focus(); 862 866 }, 100 ); 863 864 textArea.focus();865 867 } 866 867 textArea.setSelectionRange( start, end );868 868 } 869 869 870 870 // Restore the selection when the editor is initialized. Needed when the Text editor is the default.