Breaks 'up and down' scrolling on mobile devices

Created on 7 June 2024, 15 days ago
Updated 8 June 2024, 15 days ago

Problem/Motivation

The plug-in breaks 'up and down' scrolling of the page on mobile devices. You can only scroll the page by touching outside the image(s) but when you swipe on the image you cannot move d page up or down, if the image covers the entire phone screen that you can't find a space outside it, then you literally are stuck in one position.

From searches I think this is not a new issue, it was reported in the progenitor elevatezoom library, https://github.com/elevateweb/elevatezoom/issues/126
https://stackoverflow.com/questions/34946175/disable-zoom-effect-on-hove...

It has also been reported for this EZ Plus library,
https://github.com/igorlino/elevatezoom-plus/issues/97

Proposed resolution

I made a patch to disable the plug-in at screen size 768px for mobile screens. I don't know how elegant my patch is but it is a workaround for us.

I made changes in elevatezoomplus.load.js and uglified it to elevatezoomplus.load.min.js

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇳🇬Nigeria chike Nigeria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @chike
  • 🇮🇩Indonesia gausarts

    Thank you.

    I would normally add spaces around locked elements using just CSS so to keep the scroll functionality as needed.

    But your solution makes sense, too.

    For blazy:3.0.7+, we have an internal method to detect touch devices, $.isTouch() with a callback. Since pseudo :hover is not available in touch devices, perhaps we can use it:
    https://git.drupalcode.org/project/blazy/-/blob/3.0.8/js/src/dblazy.js?r...

    Or just use window.matchMedia() either as listener, or direct method.

    But yours is fine, too, if the library considered pseudo :active which is available at touch devices, but not :hover.

  • Status changed to Needs review 15 days ago
  • Status changed to Needs work 15 days ago
  • 🇮🇩Indonesia gausarts

    On second thoughts, while fine for Slick/Splide displays, this might break static grid functionality.

    What do you think?

  • 🇳🇬Nigeria chike Nigeria

    Thank you!

    You know the best way to do it, I am not a programmer as you know.

    Will be good if the breakpoint is made configurable so someone can choose the breakpoint they want zoom turned off.

Production build 0.69.0 2024