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.

git-svn-id: https://develop.svn.wordpress.org/trunk@26651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2013-12-05 00:01:42 +00:00
parent fa376b16cd
commit f90e3dc450
1 changed files with 3 additions and 3 deletions

View File

@ -407,14 +407,14 @@ wpWidgets = {
sidebarId = chooser.find( '.widgets-chooser-selected' ).data('sidebarId'),
sidebar = $( '#' + sidebarId );
// Move the chooser out of the widget
$('#wpbody-content').append( chooser );
widget = $('#available-widgets').find('.widget-in-question').clone();
widgetId = widget.attr('id');
add = widget.find( 'input.add_new' ).val();
n = widget.find( 'input.multi_number' ).val();
// Remove the cloned chooser from the widget
widget.find('.widgets-chooser').remove();
if ( 'multi' === add ) {
widget.html(
widget.html().replace( /<[^<>]+>/g, function(m) {