Skip to content

Commit 24abe53

Browse files
committed
#303 Add scroll bar support to dropdown menus on dialogs, to prevent dropdowns with many items overflowing off the bottom of the Git Graph View.
1 parent c36023d commit 24abe53

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

web/dialog.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ class CustomSelect {
441441
optionsElem.style.top = (currentElemRect.top - dialogElemRect.top + currentElemRect.height - 2) + 'px';
442442
optionsElem.style.left = (currentElemRect.left - dialogElemRect.left - 1) + 'px';
443443
optionsElem.style.width = currentElemRect.width + 'px';
444+
optionsElem.style.maxHeight = Math.max(document.body.clientHeight - currentElemRect.top - currentElemRect.height - 2, 50) + 'px';
444445
if (this.optionsElem === null) {
445446
optionsElem.className = 'customSelectOptions';
446447
this.optionsElem = optionsElem;

web/styles/dialog.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@
241241
border-radius:0 0 4px 4px;
242242
z-index:42;
243243
text-align:left;
244+
overflow-y:auto;
244245
}
245246

246247
.customSelectOption{

0 commit comments

Comments
 (0)