Changeset 31428
- Timestamp:
- 02/11/2015 11:31:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-widgets.js
r31419 r31428 251 251 // Adds a selected widget to the sidebar 252 252 submit: function( widgetTpl ) { 253 var widgetId, widget ;253 var widgetId, widget, widgetFormControl; 254 254 255 255 if ( ! widgetTpl ) { … … 269 269 } 270 270 271 this.currentSidebarControl.addWidget( widget.get( 'id_base' ) ); 271 widgetFormControl = this.currentSidebarControl.addWidget( widget.get( 'id_base' ) ); 272 if ( widgetFormControl ) { 273 widgetFormControl.focus(); 274 } 272 275 273 276 this.close(); … … 1845 1848 controlContainer.slideDown( function() { 1846 1849 if ( isExistingWidget ) { 1847 widgetFormControl.expand();1848 1850 widgetFormControl.updateWidget( { 1849 1851 instance: widgetFormControl.setting(), … … 1852 1854 throw error; 1853 1855 } 1854 widgetFormControl.focus();1855 1856 } 1856 1857 } ); 1857 } else {1858 widgetFormControl.focus();1859 1858 } 1860 1859 } );
Note: See TracChangeset
for help on using the changeset viewer.