Zooming in or out an image doesn't change the cursor into a magnifying-glass
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: obotisan, Assigned: tnikkel)
Details
Attachments
(1 file)
[Affected versions]: - Latest Nightly 61.0a1 - beta 61.0b4 - Firefox 60.0 [Affected platforms]: - Windows 10 x64 - Windows 7 x64 - Ubuntu 16.04 x64 - macOS 10.13 [Steps to reproduce]: 1. Go to http://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg 2. Zoom in or out using Ctrl + mouse wheel. 3. Observe the cursor's behaviour. [Expected result]: - The cursor changes into a magnifying-glass that shows the actions you can do (zoom in or zoom out) [Actual result]: - The cursor remains the same until the image becomes bigger than the browser's window. [Regression range]: - last good: 2008-02-07 - last bad: 2008-02-08 [Additional notes]: - The image changes back to the original size after it was zoomed in or out and the image is clicked, but the cursor doesn't change only if the image is bigger than the browser window. - This is not a regression technically speaking, it's more about the date that the browser changed it's behaviour regarding the action of zooming in and out pf an image. - Before the behaviour was similar to what Chrome does at the moment. When you zoom in the image, the cursors change, but after clicking the image gets either bigger or a smaller. It doesn't goes back to the original size.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
> 2. Zoom in or out using Ctrl + mouse wheel.
> 3. Observe the cursor's behaviour.
>
> [Expected result]:
> - The cursor changes into a magnifying-glass that shows the actions you can do (zoom in or zoom out)
Specifically, the cursor should perhaps change *as soon as you've done any zooming at all* on this image viewer page. There doesn't seem to be any reason to wait until the image is bigger than the window size. That window-size dependency seems arbitrary.
I suspect [?] the intent of this cursor-change is to indicate what will happen if you click. And the availability of this "click to restore original zoomlevel" action *only* depends on whether or not you've zoomed -- not on whether or not we've exceeded the window size.
Comment 2•6 years ago
|
||
(Though maybe the intent of this cursor is to be a hint for the reverse scenario -- e.g. when you load an extremely high-res image and we zoom out by default so that it fits your browser window, and we change the cursor as a small hint that you can click to view it at full scale if you really want to...) It would be interesting to track down the bug/changeset that "broke" this to see the reasoning there & if this was an intentional change or not.
Comment 3•6 years ago
|
||
So, when you zoom in to make the image overflow, you would see a magnifying-glass cursor, which is controlled by rule in ImageDocument.css[1], and the classes there is controlled by ImageDocument[2], and click handling code is also there[3]. We probably should change the logic in [2] to make it match that in [3]. [1] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/layout/style/ImageDocument.css#16-18 [2] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/html/ImageDocument.cpp#557-582 [3] https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/dom/html/ImageDocument.cpp#642-658
Comment 4•6 years ago
|
||
Maybe Andrew or Timothy are interested?
Updated•5 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Clicking on the image toggles between "shrink to fit" and full size mode. However it also
resets the full zoom. So if the full zoom has been changed then a click can zoom in/out.
The full situation is complicated because you could be in "shrink to fit" mode (so the cursor
should be the zoom in cursor) and then increase the full zoom so that image is bigger than it
would be in fullsize mode so clicking would actually result in zooming out. I don't try to
resolve this. Instead I just let cursor be decided by the "shrink to fit"/full size state if
that's relevant, otherwise the fullzoom will determine the cursor.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e750a604f4e In image documents change the cursor to zoom in/out based on full zoom. r=emilio
Comment 7•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Reproducible on a 2022-11-16 Nightly build on macOS 12.
Verified as fixed on Firefox 109.0b3(build ID: 20221215185833) and Nightly 110.0a1(build ID: 20221215195521) on macOS 12, Windows 10, Ubuntu 22.
Description
•