Making WordPress.org

Changeset 1276


Ignore:
Timestamp:
02/18/2015 05:59:26 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Don't check for the event if it's a single theme request.

Fixes #873.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js

    r1265 r1276  
    410410        // Keeps :focus within the theme details elements.
    411411        containFocus: function( $el ) {
    412             var $target;
     412            var ev = window.event,
     413                $target;
    413414
    414415            // On first load of the modal, move focus to the primary action.
    415             if ( 1 === $( window.event.target ).closest( '.theme' ).length ) {
     416            if ( typeof ev === 'undefined' || 1 === $( ev.target ).closest( '.theme' ).length ) {
    416417                _.delay( function() {
    417418                    $( '.theme-wrap a.button-primary:visible' ).focus();
Note: See TracChangeset for help on using the changeset viewer.