magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Product view page scrolls up randomly on mobile device #21717

Closed xiaolinwuu closed 4 years ago

xiaolinwuu commented 5 years ago

In the product view page when I scroll down a little bit, sometimes (very often) the page scrolls to the top.

Preconditions (*)

  1. Magento 2.3.0 (in my case) but I think also in previous versions
  2. Physical mobile device, Product view page

Steps to reproduce (*)

  1. Go to any product view page
  2. Scroll down slowly a little bit like 20-30px
  3. If it can't reproduces retry again

Expected result (*)

  1. The page should not scroll up automatically

Actual result (*)

  1. The page scrolls up randomly

This is the effect: https://www.youtube.com/watch?v=aKwLVwIMrpM

magento-engcom-team commented 5 years ago

Hi @xiaolinwuu. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@xiaolinwuu do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

xiaolinwuu commented 5 years ago

I found out the scroll up takes place only on mobile chrome application, I think the issue is caused by the chrome topbar that shows/hides when we manually scroll the page

xiaolinwuu commented 5 years ago

The issue was in the two elements of the fotorama widget: .fotoramaactive .fotoramaimg

They have top: 50% and position: absolute, so when chrome topbar shows/hides, the page suddenly jumps to the top.

I solved the problem extending the following css:

@media @mobile {
        .catalog-product-view {
            .fotorama__stage__frame.fotorama__active {
                position: static !important;
            }
            .fotorama__stage__frame .fotorama__img {
                position: static !important;
                transform: initial !important;
            }
       }
}
magento-engcom-team commented 5 years ago

Hi @shikhamis11. 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:

shikhamis11 commented 5 years ago

@magento-engcom-team give me 2.3-develop instance

magento-engcom-team commented 5 years ago

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

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

magento-engcom-team commented 5 years ago

@shikhamis11 Thank you for verifying the issue.

Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:

Once all required information is added, please add label "Issue: Confirmed" again. Thanks!

magento-engcom-team commented 5 years ago

:white_check_mark: Confirmed by @shikhamis11 Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98944, MAGETWO-98945 were created

Issue Available: @shikhamis11, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

dev-ajaysaini commented 5 years ago

@magento-engcom-team give me 2.3-develop instance

magento-engcom-team commented 5 years ago

Hi @webkul-ajaysaini. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team commented 5 years ago

Hi @webkul-ajaysaini, here is your Magento instance. Admin access: https://i-21717-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

krzksz commented 4 years ago

Closing this as a dupplicate of https://github.com/magento/magento2/issues/10518

slavvka commented 4 years ago

Hi @xiaolinwuu. Thank you for your report. The issue has been fixed in magento/magento2#25385 by @krzksz in 2.4-develop branch Related commit(s):

The fix will be available with the upcoming 2.4.0 release.