Unable to load image

u know the pinch zoom on mobile ?

how do u undo it via js ?


use case:

heres what happens currently (on mobile):

1. user sees expandable image

![](https://i.rdrama.net/images/16784800606710851.webp)

2. user click on image to expand it

![](https://i.rdrama.net/images/16784800612016382.webp)

3. users pinches to zoom on image

![](https://i.rdrama.net/images/16784800617413743.webp)

4. user closes the image - page is still zoomed, user must unzoom manually

![](https://i.rdrama.net/images/16784800622519965.webp)

I want it so the page gets unzoomed automatically when user closes the image, is this possible ?

36
Jump in the discussion.

No email address required.

Lazy way is to change the style to reset zoom in js as on an onclick/onTouch event on the background. More complicated is to implement your own CSS zoom on the image only. I'm on mobile now but I can come up with a small sample later when I have time


:#marseyviewerstaretalking:

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.