WordPress.org

Make WordPress Core

Changeset 26651


Ignore:
Timestamp:
12/05/2013 12:01:42 AM (7 years ago)
Author:
azaozz
Message:

Widgets: on clicking Add, don't move the chooser out of the widget early as that makes is visible at the bottom of the screen. Remove the cloned copy of it instead. Part-props jeremyfelt, fixes #26417.

File:
1 edited

Legend:

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

    r26474 r26651  
    408408            sidebar = $( '#' + sidebarId );
    409409
    410         // Move the chooser out of the widget
    411         $('#wpbody-content').append( chooser );
    412 
    413410        widget = $('#available-widgets').find('.widget-in-question').clone();
    414411        widgetId = widget.attr('id');
    415412        add = widget.find( 'input.add_new' ).val();
    416413        n = widget.find( 'input.multi_number' ).val();
     414
     415        // Remove the cloned chooser from the widget
     416        widget.find('.widgets-chooser').remove();
    417417
    418418        if ( 'multi' === add ) {
Note: See TracChangeset for help on using the changeset viewer.