Devtool does not remember zoom level when using Ctrl+scroll mouse wheel to zoom
Categories
(DevTools :: General, defect, P3)
Tracking
(firefox-esr115 wontfix, firefox123 wontfix, firefox124 wontfix, firefox125 wontfix)
People
(Reporter: josh, Unassigned)
References
(Regression)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0
Steps to reproduce:
- Open devtools
- Ctrl + zoom a few levels to the font size isnt miniscule
- Close dev tools
- Open devtools
Actual results:
Font size has reset back to tiny
Expected results:
devtools remembers the zoom level/font size
This is a recent regression (in 122?) as previously devtools rememberd the zoom level across opens and restarts. This is very important to my workflow because the default font size for the firefox devtools is tiny and exceptionally uncomfortable to use, even with my glasses - its annoying to have to re-zoom in every single time i open it, or in different tabs.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Hello Josh, we can't reproduce on 122 nor on Nightly.
Are you experiencing this with regular web pages too?
Could you try to reproduce this on a new profile?
Yes, in my main profile, and in 'safe mode' (holding shift on start up), this problem also happens with regular web pages. Opening mozilla.org and zooming in with scroll wheel, opening a new tab, closing the first, then reopening mozilla.org shows it as the default zoom level.
The dev tools issue also reproduces in a new profile (made a fresh one in about:profiles), but not regular web pages.
I'm not sure what to make about the difference in behaviour between my main profile and the fresh one for regular web pages.
If there's anything I can provide to help repro or provide insight into what's happening, please let me know! Would a screen recording help? Maybe to point out something obvious?
Comment 5•1 year ago
|
||
Thanks for the information Josh. This is outside of my domain, so let's move the bug to a component where people might know more about this
Comment 6•1 year ago
|
||
Perhaps you can use https://mozilla.github.io/mozregression/ to pinpoint the change that caused this to regress for you?
FWIW, I tried to reproduce and I could not.
Hmm, in the progress of doing the bisect, I discovered the behaviour between ctrl +/- is different than ctrl + scroll wheel. ctrl +/- will persist the zoom across devtool openings, whereas using the scroll wheel will not. Is this difference in behaviour expected?
I used mozregression to run a 121 build and and it functioned the same as the current 122 release - ctrl scroll zoom did not persist the zoom level across devtool openings.
Comment 8•1 year ago
|
||
(In reply to josh from comment #7)
I discovered the behaviour between ctrl +/- is different than ctrl + scroll wheel. ctrl +/- will persist the zoom across devtool openings, whereas using the scroll wheel will not. Is this difference in behaviour expected?
I don't think so.
Can you continue the bisect? Going further back if you need? Or report if you find out that the behaviour has not changed in the past few years either one is useful to know.
Updated•1 year ago
|
Comment 9•1 year ago
•
|
||
I can reproduce this issue on Nightly125.0a1 Windows10.
The issue is reproduced since Firefox74.
STR:
- Open the devtool (Ctrl+Shift+I)
- Holding Chtl key + scroll mouse wheel over the devtool
- Close the devtool
- Reopen the devtool (Ctrl+Shift+I)
Regression window:
This is not a regression, but just implementation bug.
GOOD build: Ctrl+scroll mouse wheel does not zoom in/out.
BAD build: Ctrl+scroll mouse wheel zooms in/out, but zoom level is not preserved.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b3fedfc4923c4be5724fcccb8acbe253792ec11d&tochange=fa76ecb197c0fb0c699e2173d352059970d65545
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Set release status flags based on info from the regressing bug 1516413
:bradwerth, since you are the author of the regressor, bug 1516413, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 11•1 year ago
|
||
Thanks Alice. Though the result is different from what the reporter was guessing, it looks like devtools doesn't keep the zoom level in the first place we supported ctrl + mouse wheel there?
On the reporter's environment, there maybe two different issues, one is the devtools one, the other is normal contents one. I can also reproduce the devtools case on my Linux box.
Though I am going to circle back this into devtools for now, I guess this issue is lying down across Layout/DOM/Frontend (Devtools), not in APZ.
Comment 12•1 year ago
|
||
Yah, Ctrl+wheel was not supported before bug 1516413.
Comment 13•1 year ago
|
||
Set release status flags based on info from the regressing bug 1516413
Comment 14•1 year ago
•
|
||
I don't think I can clarify this very much. Bug 1516413 enabled the zoomwheel behavior in Responsive Design Mode by routing mousewheel events through the front-end browser actor, eventually reaching setZoomForBrowser. The fix will be ensuring that setting the textZoom and fullZoom properties there does so in such a way that the document restore state remembers the setting.
Comment 15•1 year ago
|
||
Honza, can we please get Priority/Severity ratings applied for release management?
Adding flag to triage this at our weekly meeting.
Updated•1 year ago
|
Comment 17•1 year ago
|
||
DevTools has dedicated code to remember the zoom level when using keys at https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/devtools/client/shared/zoom-keys.js
We might not catch the default zoom feature triggered with the mouse wheel (and we also could not reproduce on macos so far).
Needs investigation.
Comment 18•1 year ago
|
||
The tracers, from the browser toolbox helped me spot that the zoom changes from this code:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/browser/base/content/browser-fullZoom.js#94-98
This special DOM event is emitted by the native code:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/docshell/base/CanonicalBrowsingContext.cpp#1269-1278
So DevTools are resized by native code and DevTools isn't persisting this different way of zooming.
Note that this browser code tries to save zoom in a preference by document URI as a key:
https://searchfox.org/mozilla-central/rev/9cd4ea81e27db6b767f1d9bbbcf47da238dd64fa/browser/base/content/browser-fullZoom.js#580-590
But it most likely doesn't work for special devtools documents.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•