Commit fb163d29 authored by Alex Danilo's avatar Alex Danilo Committed by Commit Bot

Remove unnecessary scroll bar on sub menus

Setting overflow-x:scroll forces a scroll bar to be shown.

On the sub-menu, use overflow-x:auto always so the browser handles
deciding when a scroll bar should be drawn.

No new tests, covered by existing unit tests.

Bug: 1001481
Change-Id: Icf84c0ea9a40b65383bcb7be23be84d2f0ee3a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933858Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718576}
parent 9cd25544
......@@ -177,12 +177,8 @@ cr.define('cr.ui', () => {
// allows the menu height to grow crbug/934207
style.maxHeight =
(viewportHeight - itemRect.top - this.menuEndGap_) + 'px';
if ((itemRect.top + childRect.height + this.menuEndGap_) >
viewportHeight) {
style.overflowY = 'scroll';
} else {
style.overflowY = 'auto';
}
// Let the browser deal with scroll bar generation.
style.overflowY = 'auto';
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment