[wp-trac] [WordPress Trac] #54063: Customizer: First autosave after publish moves you out of the "Block Settings" area

WordPress Trac noreply at wordpress.org
Thu Sep 2 21:47:17 UTC 2021


#54063: Customizer: First autosave after publish moves you out of the "Block
Settings" area
--------------------------+------------------------------
 Reporter:  mreishus      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by mreishus):

 When the customizer reflows, each section reinits and figures out if it
 should be active. It uses an incoming "active" variable but also wants to
 make sure the area "is contextually active".
 https://github.com/WordPress/wordpress-
 develop/blob/40edc2addb5284804e698beda487206f8dd70992/src/js/_enqueues/wp/customize/controls.js#L999
 In the case of the block settings section, it thinks that it is active,
 but the is contextually active returns false, so it becomes inactive and
 collapses.
 The default definition of isContextuallyActive for a section, looks for
 controls in that section, then checks to make sure at least one is active.
 https://github.com/WordPress/wordpress-
 develop/blob/40edc2addb5284804e698beda487206f8dd70992/src/js/_enqueues/wp/customize/controls.js#L1559-L1569
 In the case of the block settings, it doesn't find any controls, so this
 section fails. This is probably because the block settings section is
 coming from Gutenberg, and this is a missing part of the integration; it
 doesn't recognize any of the controls in Gutenberg.
 so the step forward is to find out how to override isContextuallyActive
 for the block controls section, which might mean a PR to Gutenberg; it's
 possibly being added somewhere in the 'package/customize-widgets' or
 'package/edit-widgets' directories in G.

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


More information about the wp-trac mailing list