WordPress.org

Make WordPress Core

Ticket #36900: 36900.2.diff

File 36900.2.diff, 1.7 KB (added by joemcgill, 5 years ago)

Patches source file and includes changes to built file.

  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index 91b5d3a..ccb3a54 100644
    AttachmentsBrowser = View.extend({ 
    40854085                });
    40864086
    40874087                // Add keydown listener to the instance of the Attachments view
    4088                 this.attachments.listenTo( this.controller, 'attachment:keydown:arrow',     this.attachments.arrowEvent );
    4089                 this.attachments.listenTo( this.controller, 'attachment:details:shift-tab', this.attachments.restoreFocus );
     4088                this.controller.on( 'attachment:keydown:arrow',     _.bind( this.attachments.arrowEvent, this.attachments ) );
     4089                this.controller.on( 'attachment:details:shift-tab', _.bind( this.attachments.restoreFocus, this.attachments ) );
    40904090
    40914091                this.views.add( this.attachments );
    40924092
  • src/wp-includes/js/media/views/attachments/browser.js

    diff --git src/wp-includes/js/media/views/attachments/browser.js src/wp-includes/js/media/views/attachments/browser.js
    index 819d251..bd83278 100644
    AttachmentsBrowser = View.extend({ 
    354354                });
    355355
    356356                // Add keydown listener to the instance of the Attachments view
    357                 this.attachments.listenTo( this.controller, 'attachment:keydown:arrow',     this.attachments.arrowEvent );
    358                 this.attachments.listenTo( this.controller, 'attachment:details:shift-tab', this.attachments.restoreFocus );
     357                this.controller.on( 'attachment:keydown:arrow',     _.bind( this.attachments.arrowEvent, this.attachments ) );
     358                this.controller.on( 'attachment:details:shift-tab', _.bind( this.attachments.restoreFocus, this.attachments ) );
    359359
    360360                this.views.add( this.attachments );
    361361