Clicking on zoomed images does not display them centered and zoom indicator doesn't reflect the true level
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: obotisan, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(2 files)
Reporter | ||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Reporter | ||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Updated•3 years ago
|
Comment 5•1 year ago
|
||
Desktop QA has been highlighting this defect as a known issue for several release cycles now, following regression testing. Daniel, it would really help us if you set a priority on this bug — it will give us clarity on whether this issue is still worth mentioning in future test reports.
Comment 6•1 year ago
•
|
||
I think this is likely not a high priority bug. Taking a look to briefly reassess the issue while I'm here, though.
I'm actually having a hard time seeing what the regression here was.
I see what-looks-to-me like the "bad" behavior in Nightly 2017-12-06 (a day before comment 3's regression range) as well as in much older builds from e.g. 2014-01-02. (I see the "jump" based on where you click, and I see the "image zoom" taking over from full-page-zoom at that point [using kats' terminology] to still zoom in but in a different way; and I'm not immediately seeing any difference related to the regression range.)
Oana, can you clarify what the behavior-change was in the regression range from comment 3 here?
Comment 7•1 year ago
|
||
Here's an image that can be used for testing purposes -- the image linked in comment 0 isn't available anymore, but I think any image that's larger than the browser viewport (as this one should be for reasonably-sized monitors) should exercise the relevant behavior/features
Comment 8•1 year ago
•
|
||
to be clear, I definitely agree that:
(A) the click-triggered swap between types-of-zoom ("full page zoom on unzoomed image" to "image shown at full-scale") does feel clunky and unintuitive
(B) the fact that the click jumps to a part of the image not-in-the-viewport when you click at the bottom-right feels pretty unexpected.
Part (A) is not something that can just be fixed, since it just falls out of the fact that we have two different methods of zoom here. I think we would need a fair amount of redesign how the image viewing UI works to improve things on that front, probably with some input from UX folks etc, which would be a bit of a project and is probably not high-priority to get resourced any time soon, I'd bet.
Part (B) does feel like something that could be fixed. I think we're interpreting the click as if it were a click in the viewport when the whole image is being displayed (scaled down to fit the viewport), and we're jumping to show you the corresponding part of the image when we swap it to display at its full resolution. So clicks in the bottom right of the viewport take you to the bottom right of the image. We probably should be taking the current zoom level into account there so that we can figure out what part of the image you actually clicked on. I suspect the relevant code for that geometry is here:
https://searchfox.org/mozilla-central/rev/a26e972e97fbec860400d80df625193f4c88d64e/dom/html/ImageDocument.cpp#468-479
Having said that, though, both of these issues (A)/(B) are things that I'm seeing in builds from before the regression range that's been identified here, so I'm not sure if there's yet-another-issue separate from A/B that I'm not seeing, or if they started manifesting slightly differently around that range in a way that I'm not seeing, or what.
Updated•1 year ago
|
Updated•1 year ago
|
Reporter | ||
Comment 9•1 year ago
|
||
You are right. The regression range for this issue is not correct. I can reproduce the bug on very old builds (2011-01-02). I am not even sure that this bug has a regression range.
But just to clarify things the issue here is that at the first click the image jumps and only at the second click it zooms out. The expected behaviour here should be that the image is zoomed out at the first click. However if this can't be fixed, at least the jumping part would still be an improvement, because it's really strange that it jumps as well.
Reporter | ||
Updated•1 year ago
|
Comment 10•1 year ago
•
|
||
(In reply to Oana Botisan, Desktop QA from comment #9)
You are right. The regression range for this issue is not correct. I can reproduce the bug on very old builds (2011-01-02). I am not even sure that this bug has a regression range.
Thanks for confirming that
But just to clarify things the issue here is that at the first click the image jumps and only at the second click it zooms out. The expected behaviour here should be that the image is zoomed out at the first click.
So, I totally agree that this is unintuitive, but it is in fact "correct", as kats sort-of explained at the end of comment 2. Chromium and WebKit have this same behavior as well (though it's a bit extra/confusing for them since they retain the full-page-zoom as a supplemental zoom factor when you click to toggle here).
As kats noted in comment 2, there are two different kinds of zoom here:
(A) Images that are too large will automatically get scaled-down to fit the viewport at first load, which we can call "image scale-down zoom".
(B) As with any page, you can use Ctrl +/-
to zoom in/out using "full page zoom".
Here's what happens:
- When you first load the image, we have "image scale down zoom" applied.
- Then when you do
Ctrl +
, you are applying a bit of full-page-zoom to that scaled-down view. - When you click the image, it turns off both forms of zoom and you see the image at full resolution (no zoom is applied at all). This feels like you're zooming in, but really you're just snapping to see the image at its full resolution.
- When you click the image again, it reenables "image scale down zoom" and you go back to the initial rendering.
Chrome and WebKit have the same behavior as us, except that they don't cancel out the full-page-zoom in the 3rd step, so you see the image at full resolution with some full-page-zoom applied to it which ends up feeling more-broken and less intuitive (in my opinion) since you have to do two different things to get back to a regular view of the full image. (Those things being (1) clicking and (2) doing Ctrl -
, to undo each type of zoom that you have applied)
So, bottom line: this isn't the most usable interface, and it might be worth pointing a UX designer at how we might redesign this at some point; but for now at least, the behavior here is as-intended and at-least-as-understandable as the competition.
However if this can't be fixed, at least the jumping part would still be an improvement, because it's really strange that it jumps as well.
Yup. I'm going to spin off a separate bug to focus specifically on that, as a dependency of this one.
Comment 11•1 year ago
|
||
--> I spun off bug 1903880 for the "jump" (described in e.g. comment 8 part B)
Description
•