From dca94de026d19c6ab0433d6ac2b0e3a7f8dc6b86 Mon Sep 17 00:00:00 2001 From: bwang Date: Wed, 5 Jan 2022 14:49:19 -0600 Subject: [PATCH] Fix caction menu button from having a width that's 1px too small Bug: T294883 Change-Id: Ibda07f60d8e94305d36a6bdc2c095b1a93dd6cba --- resources/skins.vector.legacy.js/vector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/skins.vector.legacy.js/vector.js b/resources/skins.vector.legacy.js/vector.js index 3e08635..810c391 100644 --- a/resources/skins.vector.legacy.js/vector.js +++ b/resources/skins.vector.legacy.js/vector.js @@ -35,7 +35,7 @@ function init() { // Then animate from the 1px to the expanded width. expandedWidth = $cactions.width(); // eslint-disable-next-line no-jquery/no-animate - $cactions.find( 'h3' ) + $cactions .css( 'width', '1px' ) .animate( { width: expandedWidth }, 'normal' ); } @@ -44,7 +44,7 @@ function init() { // If we're removing the last child node right now, hide the dropdown if ( $cactions.find( 'li' ).length === 1 ) { // eslint-disable-next-line no-jquery/no-animate - $cactions.find( 'h3' ).animate( { width: '1px' }, 'normal', function () { + $cactions.animate( { width: '1px' }, 'normal', function () { $( this ).attr( 'style', '' ); mw.util.hidePortlet( cactionsId ); } );