Changeset 39569
- Timestamp:
- 12/12/2016 01:55:02 AM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-admin/js/customize-controls.js
r39505 r39569 5301 5301 5302 5302 $textarea.on( 'keydown', function onKeydown( event ) { 5303 var selectionStart, selectionEnd, value, scroll,tabKeyCode = 9, escKeyCode = 27;5303 var selectionStart, selectionEnd, value, tabKeyCode = 9, escKeyCode = 27; 5304 5304 5305 5305 if ( escKeyCode === event.keyCode ) { … … 5326 5326 5327 5327 if ( selectionStart >= 0 ) { 5328 scroll = $textarea.scrollTop;5329 5328 textarea.value = value.substring( 0, selectionStart ).concat( '\t', value.substring( selectionEnd ) ); 5330 5329 $textarea.selectionStart = textarea.selectionEnd = selectionStart + 1; 5331 textarea.scrollTop = scroll;5332 5330 } 5333 5331
Note: See TracChangeset
for help on using the changeset viewer.