Changeset 58946
- Timestamp:
- 08/28/2024 04:43:52 PM (4 months ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/image-edit.js
r58915 r58946 297 297 * 298 298 * @since 6.3.0 299 * 300 * @memberof imageEdit 301 * 299 * @since 6.7.0 Added the event parameter. 300 * 301 * @memberof imageEdit 302 * 303 * @param {Event} event The key or click event. 302 304 * @param {HTMLElement} el The current element. 303 305 * 304 306 * @return {boolean} Always returns false. 305 307 */ 306 browsePopup : function(e l) {308 browsePopup : function(event, el) { 307 309 var $el = $( el ); 308 310 var $collection = $( el ).parent( '.imgedit-popup-menu' ).find( 'button' ); … … 317 319 $next = 0; 318 320 } 319 var $target = false;321 var target = false; 320 322 if ( event.keyCode === 40 ) { 321 $target = $collection.get( $next );323 target = $collection.get( $next ); 322 324 } else if ( event.keyCode === 38 ) { 323 $target = $collection.get( $prev );324 } 325 if ( $target ) {326 $target.focus();325 target = $collection.get( $prev ); 326 } 327 if ( target ) { 328 target.focus(); 327 329 event.preventDefault(); 328 330 } -
trunk/src/wp-admin/includes/image-edit.php
r58915 r58946 76 76 $note_no_rotate = ''; 77 77 ?> 78 <button type="button" class="imgedit-rleft button" onkey up="imageEdit.browsePopup(this)" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90° left' ); ?></button>79 <button type="button" class="imgedit-rright button" onkey up="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90° right' ); ?></button>80 <button type="button" class="imgedit-rfull button" onkey up="imageEdit.browsePopup(this)" onclick="imageEdit.rotate(180, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 180°' ); ?></button>78 <button type="button" class="imgedit-rleft button" onkeydown="imageEdit.browsePopup(event, this)" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90° left' ); ?></button> 79 <button type="button" class="imgedit-rright button" onkeydown="imageEdit.browsePopup(event, this)" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 90° right' ); ?></button> 80 <button type="button" class="imgedit-rfull button" onkeydown="imageEdit.browsePopup(event, this)" onclick="imageEdit.rotate(180, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()"><?php esc_html_e( 'Rotate 180°' ); ?></button> 81 81 <?php 82 82 } else { … … 89 89 ?> 90 90 <hr /> 91 <button type="button" onkey up="imageEdit.browsePopup(this)" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-flipv button"><?php esc_html_e( 'Flip vertical' ); ?></button>92 <button type="button" onkey up="imageEdit.browsePopup(this)" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-fliph button"><?php esc_html_e( 'Flip horizontal' ); ?></button>91 <button type="button" onkeydown="imageEdit.browsePopup(event, this)" onclick="imageEdit.flip(1, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-flipv button"><?php esc_html_e( 'Flip vertical' ); ?></button> 92 <button type="button" onkeydown="imageEdit.browsePopup(event, this)" onclick="imageEdit.flip(2, <?php echo "$post_id, '$nonce'"; ?>, this)" onblur="imageEdit.monitorPopup()" class="imgedit-fliph button"><?php esc_html_e( 'Flip horizontal' ); ?></button> 93 93 <?php echo $note_no_rotate; ?> 94 94 </div>
Note: See TracChangeset
for help on using the changeset viewer.