-
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
WP admin doesn't scroll when on gutenberg screen #4445
Comments
Here are some better examples of the issue I'm seeing. (I have a ton of post-types) Current CSS with Here is the Here, |
I am having the same issue. If my viewport is shorter than my admin content, I can't scroll outside of the Gutenberg edit area and therefore can't access my full admin menu. |
Same / similar issue - referenced above |
I added a fix for this in pr #4587 Adding the scrollbar to the admin-menu seemed like the cleanest fix and won't even be noticeable to anyone who isn't currently having this problem of not being able to scroll.. It's only applied when the body gets the I tried to tie the menu in with the body scroll, but just couldn't make it smooth. Also didn't know if we were purposely keeping the scroll off of the I'm just now diving into Gutenberg so I may have missed previous discussions on the layout behavior. |
Thanks so much for working on this. There are two key issues that we want to make sure doesn't regress:
From a quick glance, it looks like #4587 seems to both work well, and not introduce any issues with the above two, as far as I can tell. I'm going to take a look again next week and see if there is a more elegant way to do it, but my gut tells me there isn't, without dropping the individually scrolling main content area (which would re-introduce the scroll bleed). But I'll get back to you, and thank you again! |
Ahh OK, that makes sense. One thing I have noticed with #4587 is that the scrollbar cuts into the width that the menu-items have to work with. |
Took another look at the PR, and realized that the reason why there's a horizontal scrollbar, is that the flyout menu has to have space to fit there. Incidentally, our tweaking of overflow breaks that. Before: After: This is a bummer, and means we'll have to take a different approach to addressing this. Thanks again for working on it, though. |
This fixes #4445. Props @m-e-h to starting the work to address this. This removes `overflow: hidden;` from the `body` element, which was previously applied at the desktop breakpoint. That means if you have a very tall navigation menu, or your viewport isn't very tall, then you can at least scroll the main container to reveal all menu items. This is not an ideal fix, as it adds another scrollbar in this edgecase. But given it's an edgecase, and given the benefits of preventing scroll bleed the individually scrolling main content area has, perhaps it's worth it? We need to test this PR to see that there aren't other side effects. We also tried letting the nav container itself scroll, but that crops the flyout menu.
I'm not sure it's an edge case. On my laptop with a few plugins installed which add:
Both the menu bar, the editor's content and the metaboxes get cropped if I've experimented a bit and found a couple of ways to stop the scrollbleedin' thing, but not sure what's best... |
Note to self: never use the term edge case 😉 it clearly is an issue that needs fixing, whether edge or not. Incidentally I submitted a PR earlier today that seems to address it: #4629 |
haha :)
|
Yep, that's the thing, when the menu needs to scroll, there is a little scroll bleed. When it doesn't, there's no scroll bleed. It's not an ideal fix, and we'll probably want to test thoroughly on metabox heavy configs, but I can't think of another fix that doesn't involve killing the flyout menu. |
I fiddled a bit in the inspector and found a way to stop the scrollbleed with css, and looked at a JS solution as well. |
Another JS approach would be to toggle a body class when the inserter is open and hide the overflow only while open.
|
Could work, but there might be some movement when changing the overflow (showing and hiding the body scrollbar) |
Appreciate your help. I've fiddled myself many times:
But each of those come with their own tradeoffs, and none of them fit the wp-admin and its legacy code very well. The same with hiding the scrollbar, it causes that page-jog. As such, I honestly feel like what we have now, with some scroll bleed in the case of long admin menus, is the most acceptable of the various tradeoffs. I also don't see any issues with the metabox implementation. This feels issue, to me, appears isolated to the left hand navigation pane. Here's a GIF of the overflow-removing PR: I acknowledge it's not ideal to see the two scrollbars on the right, on short viewports, but it feels like it is the least disruptive patch, and works reasonably well. Also remember that on mobile we're addressing this in an entirely different way. |
Fair enough. It's also probably the most reasonable and clean code. |
For when I need to make long GIFs that aren't insanely huge in filesize (still big, but not crazy), I use Licecap. It uses high compression and low framerates to keep the filesizes down, at the expense of a little choppiness, and light grays disappearing. When I need to do more high quality GIFs, I used to use Giphy (Mac app store). But now I just screen-record using Quicktime, then open the .mov file in GIF Brewery to convert it to GIF. Finally I run the GIF through ImageOptim to slim down the filesize as much as possible. |
Thanks. It's quite practical to illustrate all this trials and tests. |
It's very practical. It is a little frustrating that GIF is still the best format for this, since it's so old and impractical. But it's just works everywhere, so I find it still the best way to convey little interactions. |
What about padding the bottom of the gutenberg editor equal to the admin-menu overflow? Then we'd at least see the bottom of the doc. |
Actually, is there anything wrong with using fixed positioning for |
Issue Overview
I'm unable to scroll the wp-admin sidebar up or down. So I can't navigate to or view all of my post-types and menu-items.
Steps to Reproduce (for bugs)
Chrome 65 and Firefox 57 on Ubuntu 16.04
Expected Behavior
Scroll the admin sidebar on the y-axis.
Current Behavior
Doesn't scroll.
Possible Solution
Rather than changing the overflow behavior on the entire wp-admin by declaring on the document body like this https://github.com/WordPress/gutenberg/blob/master/editor/assets/stylesheets/main.scss#L1-L8
Declare it on just the editor.
I'm not clear on what's being accomplished with this CSS but maybe add it somewhere like
.gutenberg
or#wpbody
?Screenshots / Video
The text was updated successfully, but these errors were encountered: