Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix delay initialization options for customized JQuery UI menu widget #12161

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/web/mage/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define([
expanded: false,
showDelay: 42,
hideDelay: 300,
delay: 300,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original options that were removed still used on 104 and 108 lines in this file, so after removal them from options - they will be not defined. It looks like you've added regression. Could you check it?

mediaBreakpoint: '(max-width: 768px)'
},

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

this.delay = this.options.delay;

this._super();
$(window).on('resize', function () {
self.element.find('.submenu-reverse').removeClass('submenu-reverse');
Expand Down Expand Up @@ -583,7 +586,7 @@ define([
html.removeClass('nav-open');
setTimeout(function () {
html.removeClass('nav-before-open');
}, 300);
}, this.options.hideDelay);
}
},

Expand Down