-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix delay initialization options for customized JQuery UI menu widget #12161
Conversation
@scazz010 static test failed. Could you fix your code? |
c7eacf1
to
ab06abe
Compare
Eeek, sorry! |
lib/web/mage/menu.js
Outdated
@@ -19,8 +19,7 @@ define([ | |||
options: { | |||
responsive: false, | |||
expanded: false, | |||
showDelay: 42, | |||
hideDelay: 300, | |||
delay: 300, |
There was a problem hiding this comment.
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?
ab06abe
to
6330103
Compare
Hi Ihor, You're 100% correct. The
I've put the Would love feedback, |
…on-jquery-ui-menu-not-overwritten
@scazz010 Could you please sign CLA? |
@omiroshnichenko Signed! |
@scazz010 Looks like you made cherry-pick of commit that was made from this stemcellscarr account. Can you sign CLI from another account too? |
@omiroshnichenko done! |
Description
Documentation: http://devdocs.magento.com/guides/v2.2/javascript-dev-guide/widgets/widget_menu.html
describes the ability to set the delay on the JQuery widget opening/closing with an option 'delay'.
However, in the code, no such option appears and two undocumented options that aren't used do appear.
This PR cleans up the unused variables and passes the delay parameter into JQuery menu widget so it is used.
Manual testing scenarios
<ul data-mage-init='{"menu":{"delay": 800, "responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
Contribution checklist