Magento2: Avoid scrolling down while block-minicart has an hover effect

Created on 7 Jun 2018  路  17Comments  路  Source: magento/magento2

Preconditions
Happening in Magento 2.1.4
After testing and testing i've checked what was actually the issue so when the Icon cart must show you the list of items added to the cart with hover instead of click it presents this problem

Steps to Reproduce:

  1. Make sure that the icon cart has an hover effect to the minicart in order to show the list items:
<div class="block block-minicart empty"
    data-role="dropdownDialog"
    data-mage-init='{"dropdownDialog":{
                "triggerEvent" : "hover",
                "appendTo":"[data-block=minicart]",
                "triggerTarget":".showcart",
                "timeout": "200",
                "closeOnMouseLeave": true,
                "closeOnEscape": true,
                "triggerClass":"active",
                "parentClass":"active",
                "buttons":[]}}'>
            <div id="minicart-content-wrapper" data-bind="scope: 'minicart_content'">
                <!-- ko template: getTemplate() --><!-- /ko -->
            </div>
        </div>
  1. Add to the cart a product (it doesnt matter the product type).
  2. Don't do any click in other part of the page, just go directly with the mouse directly to the icon cart.
  3. Move your mouse off of the icon cart and when the popup dissapears _the page will scroll down automatically the page._ .

Expected Result:
Avoid the scroll down automatically while you are in list of products after moving the mouse off of popup list items

Actual Result:
Scrolling down automatically after popup modal dissapears.

Thanks.

Fixed in 2.3.x Cannot Reproduce Clear Description Format is valid

All 17 comments

@Oscar-Wagento I didn't reproduce above issue in Magento ver. 2.2.6-dev

HI @hitesh-wagento in order to reproduce the issue you have to follow the next steps:

  1. Go to the list items of one category
  2. Add to the cart one product (if you want you can add more than one)
  3. Don't click any part of the page. Go directly to the cart and click in the icon cart in order to show the items added (popup).
  4. Wait until the popup cart dissapear
  5. The page will scroll down directly.

Hi, I have the same problem. Any ideas?

Hello, I have this problem also. Any ideas?

hi @Oscar-Wagento can you recheck in 2.2-dev branch, when i tested it, i cannot reproduce, but randomly its 1 or 2 times reproduce

Hi @engcom-backlog-nazar i don't get it, have you reproduced the error?

@Oscar-Wagento No have no error, one time randomly it's not scrolling, be free to close issue.

so far there is no answer to this issue found, so it is close.

Hello everyone i got the solution for the issue.

Results here that you have to add on minicart.js the following

miniCart.on('dropdowndialogclose', function(){
        $(window).scrollTop(0);
    });

When it closes the popup from the minicart that event (dropdowndialogclose) you have to add and force the scroll up to the top. I suggest use only if you add the hover effect on dropdownDialog.

Thanks, hope this helps to the ones who has faced this issue.

@engcom-backlog-nazar this is solved :+1:

I have this problem also with hover event.
M2.1

@Oscar-Wagento this way is better

    miniCart.on('dropdowndialogclose', function () {
        var offsetTop = $(window).scrollTop();

        $('html, body').animate({
            scrollTop: offsetTop
        }, 42);
    });

Hi @TomashKhamlai. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team give me 2.3.0 instance

Hi @engcom-backlog-tomash. Thank you for your request. I'm working on Magento 2.3.0 instance for you

Hi @engcom-backlog-tomash, here is your Magento instance.
Admin access: https://i-15910-2-3-0.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

Hi @engcom-backlog-tomash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

@Oscar-Wagento, I was not able to reproduce this issue by given steps.

Was this page helpful?
0 / 5 - 0 ratings