Changeset 45227
- Timestamp:
- 04/17/2019 07:17:26 AM (6 years ago)
- Location:
- trunk/src/js/_enqueues/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/tags-box.js
r43577 r45227 370 370 * Handles pressing enter on the new tag input field. 371 371 * 372 * Prevents submitting the post edit form. 372 * Prevents submitting the post edit form. Uses `keypress` to take 373 * into account Input Method Editor (IME) converters. 373 374 * 374 375 * @since 2.9.0 … … 382 383 tagBox.userAction = 'add'; 383 384 tagBox.flushTags( $( this ).closest( '.tagsdiv' ) ); 384 event.preventDefault();385 event.stopPropagation();386 }387 }).keypress( function( event ) {388 if ( 13 == event.which ) {389 385 event.preventDefault(); 390 386 event.stopPropagation(); -
trunk/src/js/_enqueues/admin/tags-suggest.js
r44538 r45227 108 108 event.preventDefault(); 109 109 } else if ( $.ui.keyCode.ENTER === event.keyCode ) { 110 // If we're in the edit post Tags meta box, add the tag. 111 if ( window.tagBox ) { 112 window.tagBox.userAction = 'add'; 113 window.tagBox.flushTags( $( this ).closest( '.tagsdiv' ) ); 114 } 115 110 116 // Do not close Quick Edit / Bulk Edit 111 117 event.preventDefault();
Note: See TracChangeset
for help on using the changeset viewer.