igordanchenko/yet-another-react-lightbox

Close on backdrop click does not work with video plugin

stavcorcos opened this issue ยท 1 comments

Describe the bug

When using the video plugin, using the Close on Backdrop Click as described in playground does not work.

Expected behavior

When the lightbox is displaying, clicking anywhere that is not explicitly the video should close the lightbox.

How to reproduce

const [open, setOpen] = React.useState(false);
const [closeOnBackdropClick, setCloseOnBackdropClick] = React.useState(true);
<Lightbox
  open={open}
  plugins={[Video]}
  close={() => setOpen(false)}
  controller={{ closeOnBackdropClick }}
  slides={[
    {
      type: 'video',
      autoPlay: true,
      sources: [
        {
          src: /public/video.mp4,
          type: 'video/mp4',
        },
      ],
    },
  ]}
  carousel={{
    finite: true,
    preload: 0,
    imageFit: 'contain',
  }}
  render={{
    buttonPrev: () => null,
    buttonNext: () => null,
  }}
/>

Screenshots / Logs

No response

Additional context

No response

๐ŸŽ‰ This issue has been resolved in version 3.15.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€