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

Prevent remove click listener when switch from mobile to desktop mode. #10430

Merged
merged 3 commits into from
Aug 4, 2017

Conversation

jeroenalewijns
Copy link

@jeroenalewijns jeroenalewijns commented Aug 4, 2017

Description

When clicking on level0 menu item after switching from mobile to desktop mode the click event is not active. This only occurs for menu items with children.

Manual testing scenarios

  1. Open website http://magento2-demo.nexcess.net/ in desktop mode
  2. Click "woman" menu item (goes to category page)
  3. Switch to mobile mode by resizing screen
  4. Switch back to desktop mode by resizing screen
  5. "Woman" menu item click doesn't work.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Prevent remove click listener when switch from mobile to desktop mode.
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Aug 4, 2017

CLA assistant check
All committers have signed the CLA.

@ishakhsuvarov ishakhsuvarov self-assigned this Aug 4, 2017
@ishakhsuvarov ishakhsuvarov added this to the August 2017 milestone Aug 4, 2017
@@ -371,7 +371,8 @@ define([
*/
_toggleDesktopMode: function () {
var categoryParent, html;


$(this.element).off('click mouseenter mouseleave');
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, add also mousedown.

Copy link
Author

Choose a reason for hiding this comment

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

Added mousedown as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, thanks.

…to desktop mode.

 - Fixed test failures regarding coding style
@magento-team magento-team merged commit 274703e into magento:develop Aug 4, 2017
magento-team pushed a commit that referenced this pull request Aug 4, 2017
@jeroenalewijns jeroenalewijns deleted the patch-1 branch August 10, 2017 07:22
@Ctucker9233
Copy link

@magento-team Will this be backported to 2.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants