Changeset 42175
- Timestamp:
- 11/14/2017 05:18:10 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r41785 r42175 635 635 selectionPosition = TinyMCEContentAreaTop + elementTop, 636 636 visibleAreaHeight = windowHeight - ( edToolsHeight + toolbarHeight ); 637 638 // There's no need to scroll if the selection is inside the visible area. 639 if ( selectionPosition < visibleAreaHeight ) { 640 return; 641 } 637 642 638 643 /** … … 853 858 854 859 if ( textArea.focus ) { 855 // focus and scroll to the position860 // Wait for the Visual editor to be hidden, then focus and scroll to the position 856 861 setTimeout( function() { 862 textArea.setSelectionRange( start, end ); 857 863 if ( textArea.blur ) { 858 864 // defocus before focusing … … 861 867 textArea.focus(); 862 868 }, 100 ); 863 864 textArea.focus(); 865 } 866 867 textArea.setSelectionRange( start, end ); 869 } 868 870 } 869 871
Note: See TracChangeset
for help on using the changeset viewer.