-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizer: Block Widgets: Changing settings causes active section to change #55875
Comments
This is theme dependent.
Peek.2021-09-01.11-18-jetpack-visibility-dotcom.mp4^ Independent Publisher 2 example |
I was able to reproduce this using WP.org only. I downloaded the gutenberg repo and ran Peek.2021-09-02.13-49-wporg-settings-move.mp4On .org, I needed to publish once before the error happened, and it only happens on the first change. |
Reported on wp.org trac: https://core.trac.wordpress.org/ticket/54063 |
The per-theme behavior is dependent upon
|
Here's the code that's running (at least for case 1 in the 2020s) |
Got a step closer. 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". |
Created Gutenberg PR: WordPress/gutenberg#34543 |
Since WordPress/gutenberg#34543 has been merged, I'm marking this as closed. :) |
Steps to reproduce the behavior
What I expected to happen
What actually happened
Videos
Peek.2021-08-31.14-25-wpcom-behavior-customizer-advanced.mp4
^ Unexpected behavior on .com simple site - After changing setting, the sidebar display returns to the block
Peek.2021-08-31.14-26-core-behavior-customizer-advanced.mp4
^ Expected behavior on core .org only - After changing setting, the sidebar remains on the settings page
Location of bug
I believe this is an interaction between .com and .org code. If these lines of code in .org are commented out, the undesired behavior no longer happens. However, the bug does not happen on a standalone .org site. I believe .com has an autosave plugin which may be causing this behavior. Changing the setting causes this trigger to fire: the
api.state( 'saved' ).bind( updateSectionActive );
, andupdateSectionActive
moves the sidebar away from the settings page and to the block you were editing.Context
Browser / OS version
Is this specific to the applied theme? Which one?
Does this happen on simple or atomic sites or both?
Is there any console output or error text?
Level of impact (Does it block purchases? Does it affect more than just one site?)
Reproducibility (Consistent, Intermittent) Leave empty for consistent.
The text was updated successfully, but these errors were encountered: