Skip to content

doubleClickMaxStops does not remove zoom on double click #361

Open
@AHTOHO4

Description

@AHTOHO4

Describe the bug

You have a cool project, but I found unexpected behavior.

The problem is that I need to disable zoom on double click, leaving the behavior for UI buttons, but when I set doubleClickMaxStops: 0, then for some reason the zoom still remains

Expected behavior

When I stop doubleClickMaxStops: 0

I expect the maximum to be 0 times the zoom happens when I doubleclick.

How to reproduce

    <Lightbox
        open={isOpen}
        close={handleCloseLightbox}
        slides={attachments}
        index={currentAttachment}
        plugins={[Counter, Zoom, Fullscreen]}
        zoom={{ maxZoomPixelRatio: 2, doubleClickMaxStops: 0 }}
        render={{ slide: renderVideoSlide }}
    />

Screenshots / Logs

No response

Additional context

Interestingly, doubleClickDelay: 0.1 solves this problem, but in my opinion it is a bad solution.

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