[wp-trac] [WordPress Trac] #42346: Theme count is wrong in customizer

WordPress Trac noreply at wordpress.org
Thu Oct 26 11:45:30 UTC 2017


#42346: Theme count is wrong in customizer
------------------------------+-----------------------------------------
 Reporter:  subrataemfluence  |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Customize         |     Version:  4.8.2
 Severity:  normal            |  Resolution:
 Keywords:  needs-patch       |     Focuses:  javascript, administration
------------------------------+-----------------------------------------
Changes (by subrataemfluence):

 * keywords:   => needs-patch


Comment:

 Actual code in `wp-admin/js/customize-controls.js`

 {{{
 renderScreenshots();

 // Update theme count.
 count = section.container.find( 'li.customize-control:visible' ).length;
 section.container.find( '.theme-count' ).text( count );
 }}}



 While a Timeout wrapper with a `300 ms` delay fixes the issue. I propose
 the following:


 {{{
 renderScreenshots();

 window.setTimeout(function(){
    // Update theme count.
    count = section.container.find( 'li.customize-control:visible'
 ).length;
    section.container.find( '.theme-count' ).text( count );
 }, 300);

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42346#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list