WordPress.org

Make WordPress Core

Changeset 41856


Ignore:
Timestamp:
10/13/17 18:20:37 (5 weeks ago)
Author:
adamsilverstein
Message:

Media Grid: Fix escape key sometimes failing to close details modal.

Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.

Props subrataemfluence, afercia.
Fixes #42180.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-grid.js

    r41752 r41856  
    796796    previousMediaItem: function() { 
    797797        if ( ! this.hasPrevious() ) { 
    798             this.$( '.left' ).blur(); 
    799798            return; 
    800799        } 
     
    808807    nextMediaItem: function() { 
    809808        if ( ! this.hasNext() ) { 
    810             this.$( '.right' ).blur(); 
    811809            return; 
    812810        } 
  • trunk/src/wp-includes/js/media/views/frame/edit-attachments.js

    r41351 r41856  
    202202    previousMediaItem: function() { 
    203203        if ( ! this.hasPrevious() ) { 
    204             this.$( '.left' ).blur(); 
    205204            return; 
    206205        } 
     
    214213    nextMediaItem: function() { 
    215214        if ( ! this.hasNext() ) { 
    216             this.$( '.right' ).blur(); 
    217215            return; 
    218216        } 
Note: See TracChangeset for help on using the changeset viewer.