Make WordPress Core

Changeset 52792


Ignore:
Timestamp:
02/24/2022 04:33:47 AM (2 years ago)
Author:
joedolson
Message:

Media: Stop arrow keys switching media if URL focused.

Keyboard handlers were prevented from navigating attachments in input fields, but the key handler excluded readonly fields, like the media URL field. This could prevent exploring the URL using the keyboard.

Props jrivett, joemcgill, afercia.
Fixes #43202.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/frame/edit-attachments.js

    r50001 r52792  
    252252     */
    253253    keyEvent: function( event ) {
    254         if ( ( 'INPUT' === event.target.nodeName || 'TEXTAREA' === event.target.nodeName ) && ! ( event.target.readOnly || event.target.disabled ) ) {
     254        if ( ( 'INPUT' === event.target.nodeName || 'TEXTAREA' === event.target.nodeName ) && ! event.target.disabled ) {
    255255            return;
    256256        }
Note: See TracChangeset for help on using the changeset viewer.