[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 19:11:59 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 | Keywords:
Focuses: |
--------------------------+-----------------------------
Inside the customizer, I can open the widget section and edit blocks using
gutenberg. For any block, I'm able to use the 3 dots menu and choose "Show
more settings" to access Gutenberg's "Block Settings" area. Here, I may
want to make several changes, like changing the text color, the background
color, and the font size. However, in some circumstances, after making a
single change, I'm taken out of the "Block Settings" area for seemingly no
reason.
I've found that certain plugins and themes can make this happen on more
occasions (for example, on every autosave instead of only the first), but
I have steps to recreate on a completely new, out of the box install using
`wp-env`. As of now, this is 5.9-alpha-51726. My gutenberg repo is on
da052f066b0f from 2021-09-02.
Steps to reproduce
- Cloned https://github.com/WordPress/gutenberg
- Cd into it and `wp-env destroy && wp-env start` to create a clean WP
- Visit http://localhost:8888/wp-admin/ and login with admin:password
- Appearance -> Customize in sidebar menu
- Widgets in sidebar menu
- Plus sign button to create a new block, select paragraph block, type
"hello" into it
- Click on the block you just added to see the floating gutenberg bar
- Click the three dots menu then select "Show More Settings"
- Change the text color
- Click 'publish'
- Click on the block you just added to see the floating gutenberg bar
- Click the three dots menu then select "Show More Settings"
- Change the text color
- Expect to see: Remain in the "Block Settings" area
- Actually see: You are taken out of the block settings area
Video: https://user-images.githubusercontent.com/937354/131900785-c9f3e678
-349d-43fa-9862-ba712740ed03.mp4
This has something to do with Autosave in conjunction with
[https://github.com/WordPress/wordpress-
develop/blob/40edc2addb5284804e698beda487206f8dd70992/src/js/_enqueues/wp/customize/controls.js#L7207-L7216:
this code] from the customizer. I remove the line `api.state( 'saved'
).bind( updateSectionActive );`, the bug no longer happens.
I am confused why it happens sometimes and other times it does not.
However, my steps to reproduce should always work. The reason this is an
issue is when using blocks with complicated interfaces in this section, it
becomes very difficult to use in the customizer, since potentially every
change can bring you back and force you to choose "... -> Show More
Settings" before doing more work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54063>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list