medium-zoom icon indicating copy to clipboard operation
medium-zoom copied to clipboard

Auto closed on iOS safari browser

Open WinmezzZ opened this issue 3 years ago • 1 comments

Bug description

When I clicked image on iOS safari browser , it show one second then auto closed but google and edge is ok, so do with any PC browser

How to reproduce

A list of the steps to reproduce the bug.

  1. code:
  useEffect(() => {
    if (typeof window === 'undefined') return;

    const zoom = mediumZoom('article .markdown img', {
      scrollOffset: 0,
      background: 'rgba(25, 18, 25, .9)'
    });

    return () => {
      zoom.detach();
    };
  }, []);
  1. Click on the image

Expected behavior

only turn off the preview when I trigger it

Reproducible example

[my site](my site:The second picture)

Environment

  • Platform: iOS 15beta 4
  • Browser: Safari
  • medium-zoom version: 1.0.6

WinmezzZ avatar Sep 09 '21 16:09 WinmezzZ

https://user-images.githubusercontent.com/40154766/132786386-d8d3f9c0-bf4b-42f3-a171-682e7786c3f9.MOV

It looks like Safari automatically adjusts the window

WinmezzZ avatar Sep 10 '21 01:09 WinmezzZ