medium-zoom
medium-zoom copied to clipboard
Auto closed on iOS safari browser
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.
- code:
useEffect(() => {
if (typeof window === 'undefined') return;
const zoom = mediumZoom('article .markdown img', {
scrollOffset: 0,
background: 'rgba(25, 18, 25, .9)'
});
return () => {
zoom.detach();
};
}, []);
- 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
https://user-images.githubusercontent.com/40154766/132786386-d8d3f9c0-bf4b-42f3-a171-682e7786c3f9.MOV
It looks like Safari automatically adjusts the window