WordPress.org

Make WordPress Core

Changeset 22651


Ignore:
Timestamp:
11/19/2012 01:17:30 AM (8 years ago)
Author:
koopersmith
Message:

Media: Move Attachments view preventDefault handler to the events object. see #21390.

File:
1 edited

Legend:

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

    r22649 r22651  
    22052205            'change [data-setting] select':   'updateSetting',
    22062206            'change [data-setting] textarea': 'updateSetting',
    2207             'click .close':                   'removeFromLibrary'
     2207            'click .close':                   'removeFromLibrary',
     2208            'click a':                        'preventDefault'
    22082209        },
    22092210
     
    22212222            this.model.on( 'selection:single selection:unsingle', this.details, this );
    22222223            this.details( this.model, this.controller.state().get('selection') );
    2223 
    2224             // Prevent default navigation on all links.
    2225             this.$el.on( 'click', 'a', this.preventDefault );
    22262224        },
    22272225
    22282226        destroy: function() {
    22292227            this.model.off( null, null, this );
    2230             this.$el.off( 'click', 'a', this.preventDefault );
    22312228            this.remove();
    22322229        },
Note: See TracChangeset for help on using the changeset viewer.