Skip to content

Commit c6954f8

Browse files
author
Volodymyr Kublytskyi
authored
MAGETWO-84498: Fix delay initialization options for customized JQuery UI menu widget magento#12161
2 parents 1ca61ca + 69342e3 commit c6954f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/web/mage/menu.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ define([
2121
expanded: false,
2222
showDelay: 42,
2323
hideDelay: 300,
24+
delay: 300,
2425
mediaBreakpoint: '(max-width: 768px)'
2526
},
2627

@@ -30,6 +31,8 @@ define([
3031
_create: function () {
3132
var self = this;
3233

34+
this.delay = this.options.delay;
35+
3336
this._super();
3437
$(window).on('resize', function () {
3538
self.element.find('.submenu-reverse').removeClass('submenu-reverse');
@@ -583,7 +586,7 @@ define([
583586
html.removeClass('nav-open');
584587
setTimeout(function () {
585588
html.removeClass('nav-before-open');
586-
}, 300);
589+
}, this.options.hideDelay);
587590
}
588591
},
589592

0 commit comments

Comments
 (0)