Ticket #31793: 31793.3.diff
File 31793.3.diff, 1.1 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/customize-controls.js
1951 1951 api.ThemeControl = api.Control.extend({ 1952 1952 1953 1953 touchDrag: false, 1954 isRendered: false, 1954 1955 1955 1956 /** 1956 1957 * Defer rendering the theme control until the section is displayed. … … 1961 1962 var control = this, 1962 1963 renderContentArgs = arguments; 1963 1964 1964 api.section( control.section(), function 1965 api.section( control.section(), function( section ) { 1965 1966 if ( section.expanded() ) { 1966 1967 api.Control.prototype.renderContent.apply( control, renderContentArgs ); 1968 control.isRendered = true; 1967 1969 } else { 1968 section.expanded.bind( function 1969 if ( expanded ) {1970 section.expanded.bind( function( expanded ) { 1971 if ( expanded && ! control.isRendered ) { 1970 1972 api.Control.prototype.renderContent.apply( control, renderContentArgs ); 1973 control.isRendered = true; 1971 1974 } 1972 1975 } ); 1973 1976 }