-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove sticky-menu class preventing full admin page scroll #11308
Conversation
Noting that not adding I'm also not exactly sure if this is the best place and I appreciate the component may not be specific to WordPress. |
Gutenberg adds ‘is-fullscreen-mode’ to the page body class, causing WordPress to add ‘sticky-menu’. This prevents the page being vertically scrolled, cutting off long admin menus. Remove ‘sticky-menu’ as part of the FullscreenMode setup
1e4a309
to
4baf632
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to add the class back when fullscreen mode is left, and this probably warrants a test too.
Hi @johnbillion! What's the status of this PR? |
I think you meant @johngodley 😉 |
🤦♂️ |
I need to address the point raised above - will circle back. |
In case it was added for a legitimate reason originally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 And thanks for the tests.
Do the changes look ok to you @tofumatt ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
If you have a long admin menu it's not possible to scroll down when Gutenberg first loads.
This is caused because of #9567 adding
is-fullscreen-mode
to the page body class. This causes core WordPress to addsticky-menu
to the page, which sets the admin menu toposition: fixed
.Resizing the window causes Gutenberg to re-apply body class values, and
sticky-menu
is then lost.More information can be found in this comment.
This PR modifies the
FullscreenMode
component to removesticky-menu
when it first starts to counteract addingis-fullscreen-mode
in PHP.Fixes #9996
How has this been tested?
Checklist: