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

Some options don't work on mobile #522

Open
gipic opened this issue Aug 4, 2024 · 0 comments
Open

Some options don't work on mobile #522

gipic opened this issue Aug 4, 2024 · 0 comments

Comments

@gipic
Copy link

gipic commented Aug 4, 2024

Hi,
I am new to this library and I appreciate your work, because this is awesome!
Anyway, I have found some little bugs:

  • option "zoomable" does not work on mobile. Even if I set to false, then I can do pinch to zoom.
  • option "touchNavigation" with false value on mobile disable the possibility to actual change images in gallery. Why next and prev selectors are hidden on mobile? Plus, if touchNavigation="false" then zoom on mobile is disabled (the only way to disable zoom on mobile appears to be this one but i cannot navigate images).

I have tried on Chrome (last version) on Windows 10 and Linux (Kubuntu).
About mobile phones: iphone 13 mini and an old Galaxy S7.

Maybe I don't know ho to configure it because I am very new to this library.
If so, I apologize.

The gallery is the simplest one (images are on "img" folder).

THANK YOUR VERY MUCH.

<!DOCTYPE html>
<html lang="it">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Galleria con GLightbox</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />
    <script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>

    <style>
        * {
            box-sizing: border-box;
        }


        .container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
        }

        .container img {
            margin-right: 5px;
        }


        @media screen and (max-width: 700px) {
            img {
                width: 100%;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <a href="img/large/gm1.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm1.jpg" alt="image" />
        </a>

        <a href="img/large/gm2.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm2.jpg" alt="image" />
        </a>
        <a href="img/large/gm3.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm3.jpg" alt="image" />
        </a>

        <a href="img/large/gm4.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm4.jpg" alt="image" />
        </a>

        <a href="img/large/gm5.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm5.jpg" alt="image" />
        </a>

        <a href="img/large/gm6.jpg" class="glightbox" data-gallery="gallery1">
            <img src="img/small/gm6.jpg" alt="image" />
        </a>
    </div>

    <script>
        let lightbox = GLightbox({zoomable: false });
    </script>
</body>

</html>
@gipic gipic changed the title Some options does not work on mobile Some options don't work on mobile Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant