summaryrefslogtreecommitdiffstatshomepage
path: root/src/js
diff options
context:
space:
mode:
authorJohn James Jacoby <johnjamesjacoby@git.wordpress.org>2021-11-02 17:06:16 +0000
committerJohn James Jacoby <johnjamesjacoby@git.wordpress.org>2021-11-02 17:06:16 +0000
commitdf8a2b408bba6a1c08b71995a32b042fd2607bad (patch)
tree352c2791bcfc5d1dbde64ac1b1832db1c1284ae0 /src/js
parentdbf96aadab9cffbf1999f24488b8e210b9812b2a (diff)
downloadwordpress-df8a2b408bba6a1c08b71995a32b042fd2607bad.tar.gz
wordpress-df8a2b408bba6a1c08b71995a32b042fd2607bad.zip
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
Diffstat (limited to 'src/js')
-rw-r--r--src/js/_enqueues/admin/common.js2
1 files changed, 1 insertions, 1 deletions
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);