[wp-trac] [WordPress Trac] #30818: Customizer: Cannot Reorder/Move widget to new widget area in Firefox

WordPress Trac noreply at wordpress.org
Mon Dec 22 22:19:09 UTC 2014


#30818: Customizer: Cannot Reorder/Move widget to new widget area in Firefox
--------------------------+-----------------------------
 Reporter:  tywayne       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 Steps to recreate:

 1. Activate a theme with multiple sidebars registered (I was using
 TwentyFourteen).
 2. Go to Appearance -> Customize, then select Widgets
 3. Toggle view of widgets in one of the sidebars
 4. Click Reorder, then the 'move widget' icon
 5. This will toggle a list of other registered sidebar areas where you can
 move the widget to. Attempting to select one of them will do nothing but
 give {{{ReferenceError: event is not defined}}} error.

 The error is in lines 684-693 of /wp-admin/js/customize-widgets.js

 {{{
 this.container.find( '.widget-area-select' ).on( 'click keypress', 'li',
 function( e ) {
     if ( event.type === 'keypress' && ( event.which !== 13 && event.which
 !== 32 ) ) {
         return;
     }
     e.preventDefault();
     selectSidebarItem( $( this ) );
 } );
 }}}

 The parameter passed to the function is {{{e}}} but then referenced in the
 function as {{{event}}}

 Chrome/Safari seem to ignore this and work just fine, but Firefox throws
 the error and doesn't allow the action.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30818>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list