Scrollbar gets hidden when opening dropdown menu
Categories
(bugzilla.mozilla.org :: Bug Creation/Editing, defect)
Tracking
()
People
(Reporter: arai, Assigned: arai)
References
(Regression)
Details
(Keywords: regression)
Attachments
(6 files)
Steps to reproduce:
- on macOS's preference, configure the scrollbar to be always shown
- click Status drop down menu on bugzilla
Actual result:
scrollbar gets hidden, and the entire content gets shifted.
Expected result:
the drop down menu doesn't hide scrollbar.
Assignee | ||
Comment 1•4 months ago
•
|
||
This comes from the following code:
class BzSelectElement extends HTMLElement {
...
#showDropdown() {
...
document.body.style.setProperty('overflow', 'hidden');
I suppose it's to suppress scroll which makes the drop down menu off from the anchor, but the scrollbar getting hidden/shown for each click is more problematic, given that happens while regular operation, and it's hard to operate on each menu if the entire page content shifts every time.
possible solutions:
(a) apply(this resets the scroll position, and doesn't work well if the menu is opened with scrollTop != 0)overflow-y: scroll
+position: fixed
instead- (b) just allow scrolling
- (c) allow scrolling, and periodically update the menu position
Comment 2•4 months ago
|
||
Assignee | ||
Comment 3•4 months ago
|
||
Assignee | ||
Comment 4•4 months ago
|
||
I took (c), with updating the position on scroll event
Comment 5•4 months ago
|
||
Comment 6•4 months ago
|
||
Comment 7•4 months ago
|
||
This change has caused a visual issue with Firefox on Windows that I have verified on my end. It causes a white bar on the right and/or left sides of the viewport where a scroll bar would normally be even if the scroll bar is not visible. If I disable to the CSS change using devtools, the bar disappears. Attaching screenshot.
Comment 8•4 months ago
|
||
Assignee | ||
Comment 9•4 months ago
|
||
my PR won't cause the issue.
can we use it instead?
Comment 10•4 months ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #9)
my PR won't cause the issue.
can we use it instead?
Comment 11•3 months ago
|
||
Assignee | ||
Comment 12•3 months ago
|
||
bug 1870891 patch is reverted and the problem no longer reproduces.
Updated•3 months ago
|
Description
•