Skip to content

Commit

Permalink
#303 Add scroll bar support to dropdown menus on dialogs, to prevent …
Browse files Browse the repository at this point in the history
…dropdowns with many items overflowing off the bottom of the Git Graph View.
  • Loading branch information
mhutchie committed May 7, 2020
1 parent c36023d commit 24abe53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ class CustomSelect {
optionsElem.style.top = (currentElemRect.top - dialogElemRect.top + currentElemRect.height - 2) + 'px';
optionsElem.style.left = (currentElemRect.left - dialogElemRect.left - 1) + 'px';
optionsElem.style.width = currentElemRect.width + 'px';
optionsElem.style.maxHeight = Math.max(document.body.clientHeight - currentElemRect.top - currentElemRect.height - 2, 50) + 'px';
if (this.optionsElem === null) {
optionsElem.className = 'customSelectOptions';
this.optionsElem = optionsElem;
Expand Down
1 change: 1 addition & 0 deletions web/styles/dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
border-radius:0 0 4px 4px;
z-index:42;
text-align:left;
overflow-y:auto;
}

.customSelectOption{
Expand Down

0 comments on commit 24abe53

Please sign in to comment.