Skip to content
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

Can't scroll WP menu when in editor #9996

Closed
maximebj opened this issue Sep 18, 2018 · 5 comments · Fixed by #11308
Closed

Can't scroll WP menu when in editor #9996

maximebj opened this issue Sep 18, 2018 · 5 comments · Fixed by #11308
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@maximebj
Copy link
Contributor

When having a very long WordPress Menu, it can't be scrolled on the editor page :

scroll

I think it's just a small CSS issue. This seems to cause the issue:

@media (min-width: 782px) .gutenberg__editor { min-height: calc(100vh - 32px); }

Gutenberg v 3.8

@chrisvanpatten
Copy link
Contributor

So I'm personally not able to reproduce this — on my end, it scrolls, but the menu does scroll separately from Gutenberg.

That said, there was another report of this in Slack so it's probably worth investigating further.

It's also not a great UX to effectively have three separate scroll areas: the left menu, the center editor canvas, and the right inspector sidebar. I wonder if there's a sensible way to consolidate these into fewer scroll areas?

@chrisvanpatten chrisvanpatten added [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. Needs Testing Needs further testing to be confirmed. labels Sep 18, 2018
@ssgro
Copy link

ssgro commented Oct 3, 2018

I can also confirm @maximebj bug report. Tested with Gutenberg version 3.9 in:

  • Chrome, version 69.0.3497.100
  • Firefox, 62.0.2
  • Microsoft Edge 42.17134.1.0

@Soean
Copy link
Member

Soean commented Oct 12, 2018

@chrisvanpatten I can reproduce the error. If you just resize the window you can scroll, but if you reload the window you aren't able to scroll anymore.

@Soean Soean removed the Needs Testing Needs further testing to be confirmed. label Oct 12, 2018
@Soean Soean added this to the WordPress 5.0 milestone Oct 12, 2018
@johngodley
Copy link
Contributor

To make this a bit easier to test you can drop this into a file in wp-content/plugins/ and then activate it from the plugins menu. You'll then have a very tall admin menu!

<?php
/*
Plugin Name: Long Menu
Description: Gives you a really long menu
*/

function really_long_menu() {
}

function add_really_long_menu() {
    for ( $loop = 1; $loop < 30; $loop++ ) {
        add_menu_page( 'Long Menu ' . $loop, 'Long Menu ' . $loop, 'manage_options', 'page-' . $loop, 'really_long_menu' );
    }
}

add_action( 'admin_menu', 'add_really_long_menu' );

I've determined that it's something to do with the sticky-menu body class. This is present on page load, but removed when you resize the page. Investigating where it comes from.

@johngodley
Copy link
Contributor

Debugging further, sticky-menu is added by setPinMenu() in the core WordPress file common.js - this is preventing the scroll.

sticky-menu is added because #adminmenuwrap has a height of 0

#adminmenuwrap has a height of 0 because is-fullscreen-mode is present on the body class, and this hides the admin menu.

is-fullscreen-mode was added to stop a jump in the UI, according to #9567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants