Admin/Menu: include `960` exact pixel width in collapse measurements.

This change removes a 1 pixel gap in the measurement of the viewport width when clicking the "Collapse menu" button (at the bottom of the admin menu UI) when already collapsed, causing the menu not to open as intended when exactly 960 pixels wide.

Before this change, the menu would be stuck in the collapsed position. After this change, the menu opens as expected.

Props abesell132, ankit-k-gupta, audrasjb, boniu91, mai21, sabernhardt, webaxones.

Fixes #54210.
Built from https://develop.svn.wordpress.org/trunk@51977


git-svn-id: http://core.svn.wordpress.org/trunk@51566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
johnjamesjacoby 2021-11-02 17:07:57 +00:00
parent dd7cb532a1
commit f60dae0731
3 changed files with 3 additions and 3 deletions

View File

@ -854,7 +854,7 @@ $( function() {
// Reset any compensation for submenus near the bottom of the screen. // Reset any compensation for submenus near the bottom of the screen.
$('#adminmenu div.wp-submenu').css('margin-top', ''); $('#adminmenu div.wp-submenu').css('margin-top', '');
if ( viewportWidth < 960 ) { if ( viewportWidth <= 960 ) {
if ( $body.hasClass('auto-fold') ) { if ( $body.hasClass('auto-fold') ) {
$body.removeClass('auto-fold').removeClass('folded'); $body.removeClass('auto-fold').removeClass('folded');
setUserSetting('unfold', 1); setUserSetting('unfold', 1);

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.9-alpha-51976'; $wp_version = '5.9-alpha-51977';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.