Skip to content

Commit 949086a

Browse files
authored
ENGCOM-5695: added fix for the ticket #24210 #24211
2 parents 47e53aa + be24396 commit 949086a

File tree

1 file changed

+10
-9
lines changed
  • app/design/adminhtml/Magento/backend/web/js

1 file changed

+10
-9
lines changed

app/design/adminhtml/Magento/backend/web/js/theme.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,18 @@ define('globalNavigation', [
267267
if (subMenu.length) {
268268
e.preventDefault();
269269
}
270-
271-
menuItem.addClass('_show')
272-
.siblings(menuItemSelector)
273-
.removeClass('_show');
274-
275-
subMenu.attr('aria-expanded', 'true');
276-
277270
closeBtn.on('click', close);
278271

279-
this.overlay.show(0).on('click', close);
280-
this.menuLinks.last().off('blur');
272+
if ($(menuItem).hasClass('_show')) {
273+
closeBtn.trigger('click');
274+
} else {
275+
menuItem.addClass('_show')
276+
.siblings(menuItemSelector)
277+
.removeClass('_show');
278+
subMenu.attr('aria-expanded', 'true');
279+
this.overlay.show(0).on('click', close);
280+
this.menuLinks.last().off('blur');
281+
}
281282
},
282283

283284
/**

0 commit comments

Comments
 (0)