Make WordPress Core

Changeset 26826


Ignore:
Timestamp:
12/09/2013 07:06:15 AM (11 years ago)
Author:
nacin
Message:

Themes: Avoid a JS error in the keyup event handler when the overlay is not yet initialized.

fixes #26497.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r26815 r26826  
    391391        // Bind keyboard events.
    392392        $('body').on( 'keyup', function( event ) {
     393            if ( ! self.overlay ) {
     394                return;
     395            }
     396
    393397            // Pressing the right arrow key fires a theme:next event
    394398            if ( event.keyCode === 39 ) {
Note: See TracChangeset for help on using the changeset viewer.