element-hq / element-hq/element-web
Image viewer doesn't show images unscaled when zooming in via mouse click
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
I'm using this image for testing:  (from [here](https://en.wikipedia.org/wiki/Lorem_ipsum))
1. Post an image into any chat
2. Have your chat window be smaller than the image
3. **Then** click on the image to open it in the image viewer
4. It is scaled down to fit the window, which is OK
5. Click on the image to enlarge it
### Outcome
#### What did you expect?
Shows the picture unscaled, i.e. pixel-perfect mapping from image pixels to device pixels.
This is what the image looks like unscaled, when the element window is big enough to fit it (may need to open in a new tab to see unscaled):

#### What happened instead?
The picture got bigger but is still scaled as is evident from the blurry text.

**Interestingly this only affects zooming via mouse click.** If you close and open the image viewer again, and this time use the "Zoom in" button at the top a couple of times, eventually the image will be unscaled.
### Operating system
Windows 10
### Application version
Element version: 1.9.8 Olm version: 3.2.8
### How did you install the app?
https://element.io/get-started#download
### Homeserver
_No response_
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.