Skip to content

Going off the browser window with the cursor while dragging a slide results in it being halfway off the screen. #583

@jawlkumuna

Description

@jawlkumuna

Describe the bug
Dragging of the window makes the current slide get stuck halfway off the screen.

In these cases it would be more user friendly for the transition to the next (or previous) slide to activate as soon as the user exits the screen.

This also seemed to occur on Android if I dragged to the very edge of the screen.

Are you able to reproduce the bug in the demo site
Yes

To Reproduce
Steps to reproduce the behavior:

  1. Go to demo site
  2. Make your browser window smaller
  3. Click and drag one of the example images off the screen and release the mouse button
  4. See error

Expected behavior
A transition should occur immediately when the cursor leaves the screen while dragging.

Post the code you are using

// occurs with this config, but also on the demo site
const lightbox = GLightbox({
        selector: '.glightbox',
        touchNavigation: false,
        loop: true,
    });

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Desktop:

  • OS: Arch Linux

  • Both Chromium and Firefox

  • Smartphone:

  • Browser: Brave

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions