From df8a2b408bba6a1c08b71995a32b042fd2607bad Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Tue, 2 Nov 2021 17:06:16 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@51977 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index 9c583f3d79..d5e2d9ad58 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -854,7 +854,7 @@ $( function() { // Reset any compensation for submenus near the bottom of the screen. $('#adminmenu div.wp-submenu').css('margin-top', ''); - if ( viewportWidth < 960 ) { + if ( viewportWidth <= 960 ) { if ( $body.hasClass('auto-fold') ) { $body.removeClass('auto-fold').removeClass('folded'); setUserSetting('unfold', 1);