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•1 year 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•1 year ago
|
||
Assignee | ||
Comment 3•1 year ago
|
||
Assignee | ||
Comment 4•1 year ago
|
||
I took (c), with updating the position on scroll event
Comment 5•1 year ago
|
||
Comment 6•1 year ago
|
||
Comment 7•1 year 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•1 year ago
|
||
Assignee | ||
Comment 9•1 year ago
|
||
my PR won't cause the issue.
can we use it instead?
Comment 10•1 year ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #9)
my PR won't cause the issue.
can we use it instead?
Comment 11•1 year ago
|
||
Assignee | ||
Comment 12•1 year ago
|
||
bug 1870891 patch is reverted and the problem no longer reproduces.
Updated•1 year ago
|
Description
•