Breaks 'up and down' scrolling on mobile devices

Created on 7 June 2024, 7 months ago
Updated 25 August 2024, 4 months 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

💬 Support request
Status

Fixed

Version

2.0

Component

Documentation

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 7 months ago
  • Status changed to Needs work 7 months 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.

  • Status changed to Fixed 5 months ago
  • 🇮🇩Indonesia gausarts

    On third thoughts, this should be addressed by CSS like #2 and responsive image to add enough room by padding or image styles to not fill up the entire screen at any devices.

    The library has mobile supports, anyway, thus hover and scroll is not an issue.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024