francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.67k stars 165 forks source link

MacBook safari-After multiple zoom in/out actions, the image disappears, but the overlay remains, making the page unclickable. #219

Open hsuyeung opened 3 months ago

hsuyeung commented 3 months ago

Bug description

On a MacBook using Safari browser, when repeatedly clicking to zoom in and zoom out images with medium-zoom version 1.0.8, the zoomed-out image disappears after several operations, but the overlay remains. This issue causes the page to be unclickable, requiring a refresh to regain functionality.

截屏2024-08-04 01 26 19

How to reproduce

A list of the steps to reproduce the bug.

  1. Open the blog post at https://www.hsuyeung.com/article/support-live-photo in Safari on a MacBook.
  2. Click on any image to zoom in.
  3. Click again to zoom out.
  4. Repeat steps 2 and 3 multiple times.

Expected behavior

The image should reappear after zooming out and the overlay should disappear, allowing the page to be interactable without requiring a refresh.

Reproducible example

https://www.hsuyeung.com/article/support-live-photo

hsuyeung commented 3 months ago

I also reproduced the problem by trying so on the official website

https://github.com/user-attachments/assets/87a9ec25-7156-46c6-86b3-05b09f3c4f29