[macOS] The about:preferences#general page is scrolled up after closing a window inside
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: atrif, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(5 files)
Found in
- 107.0a1 (20221016093143)
Affected versions
- 107.0a1 (20221016093143)
- 106.0
- 105.0.3
- 102.4.0esr
Tested platforms
- Affected platforms: macOS 10.15, macOS 13
- Unaffected platforms: Ubuntu 20.04, Windows 10x64
Steps to reproduce
- Open about:preferences#general page and scroll down to the
Fonts
area. - Click on the
Advanced
button and close the window. - Observe the scroll position.
Expected result
- The scroll position does not change.
Actual result
- The page is scrolled upwards.
Regression range
- Last good revision: f0cad1d9e20e16f6cacd1a3c01f52fdca226c5b5
16:28.16 INFO: First bad revision: 67d5d9f8377572a37548555fe9c9a7d508c39514
16:28.16 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=f0cad1d9e20e16f6cacd1a3c01f52fdca226c5b5&tochange=67d5d9f8377572a37548555fe9c9a7d508c39514
Potential regressor: bug 1400420.
Additional notes
- Attached a screen recording of the issue.
- The issue reproduced only on about:preferences#general page and does not reproduce on other Preferences page menus like
Privacy and Security
. - After opening another window inside about:preferecens#privacy menu like
Exceptions
the issue is no longer reprodcing inside the about:preferences#general page until restart.
Reporter | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
:Gijs, since you are the author of the regressor, bug 1400420, could you take a look?
For more information, please visit auto_nag documentation.
Comment 2•2 years ago
|
||
I don't understand why the dialog closing causes layout to move the scroll position by the amount of scroll padding on the pref pane. I can't see anything in JS doing this, but I'm probably missing something... Emilio, any ideas?
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
The issue is that the scroll-padding makes us think that the search textbox is not visible (so we scroll up to show it).
There might be use cases for scroll-padding actually jumping here, and other browsers also jump...
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
I want to do the whole target -> container chain walk in the same
function, reason will be apparent in a second :)
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D159531
Comment 6•2 years ago
|
||
Thanks Emilio!
Comment 7•2 years ago
|
||
Assignee | ||
Comment 8•2 years ago
|
||
So my code doesn't fix comment 7, but there's a question of whether it should. As is, my code only prevents scroll-padding from applying on the side that we're stuck on. I think that's sensible since scroll-padding is intended to cover up for fixed/abspos/sticky headers.
Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Comment 11•2 years ago
|
||
bugherder |
Comment 12•2 years ago
|
||
Comment 14•2 years ago
|
||
bugherder |
Comment 16•2 years ago
|
||
This breaks (some) unified builds:
0:12.41 In file included from Unified_cpp_tools_profiler1.cpp:29:
0:12.41 In file included from /media/external/dev/gecko-dev/tools/profiler/gecko/nsProfiler.cpp:27:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/Promise.h:24:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/ToJSValue.h:25:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/BindingUtils.h:30:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/dom/Document.h:18:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/Units.h:12:
0:12.41 In file included from /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/gfx/Coord.h:11:
0:12.41 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/gfx/Types.h:1054:41: error: reference to 'Side' is ambiguous
0:12.41 inline constexpr SideBits SideToSideBit(Side aSide) {
0:12.41 ^
0:12.41 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/gfx/Types.h:1033:6: note: candidate found by name lookup is 'mozilla::Side'
0:12.41 enum Side : uint8_t { eSideTop, eSideRight, eSideBottom, eSideLeft };
0:12.41 ^
0:12.41 /media/external/dev/gecko-dev/obj-b2g-desktop/dist/include/mozilla/ipc/MessageLink.h:44:6: note: candidate found by name lookup is 'mozilla::ipc::Side'
0:12.41 enum Side : uint8_t { ParentSide, ChildSide, UnknownSide };
0:12.41 ^
0:12.41 1 error generated.
This patch fixes it - feel free to steal it:
diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h
index f2ace5e602277..fc3a910daa3c4 100644
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -1051,7 +1051,7 @@ enum class SideBits {
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(SideBits)
-inline constexpr SideBits SideToSideBit(Side aSide) {
+inline constexpr SideBits SideToSideBit(mozilla::Side aSide) {
return SideBits(1 << aSide);
}
Assignee | ||
Updated•2 years ago
|
Comment 17•2 years ago
|
||
Comment 18•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 19•2 years ago
|
||
Hello! Verified the issue with Firefox 108.0a1 (2022-10-27) on macOS 10.15 and macOS 12. I about:preferences page is no longer scrolled after following steps from comment 0 or when switching focus on the reduced test case from comment 3.
However, the page is scrolled down when switching focus on the test case from comment 7. From comment 8 I understand that this is the expected behavior.
Emilio, just to be extra safe here is it ok that when switching focus on the test case from comment 7 the page is scrolled down? Thank you in advance!
Assignee | ||
Comment 20•2 years ago
|
||
Yes, that's expected for now at least, pending other discussion. Thanks for checking!
Reporter | ||
Comment 21•2 years ago
|
||
Thank you, Emilio! Closing as verified per the above comments.
Updated•2 years ago
|
Description
•