Skip to content

Mouse swipe navigation closes the lightbox when closeOnBackdropClick is enabled #357

@igordanchenko

Description

@igordanchenko

Describe the bug

When the closeOnBackdropClick option is enabled, swiping on the black background outside an image closes the lightbox.

See #354 (reply in thread) for details.

Expected behavior

Lightbox should not close in this case.

How to reproduce

<Lightbox
  open={open}
  close={() => setOpen(false)}
  slides={slides}
  controller={{ closeOnBackdropClick: true }}
/>

Screenshots / Logs

Image

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleasedImplemented and released

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions