Skip to content

Commit

Permalink
Merge e000e09 into 37659fb
Browse files Browse the repository at this point in the history
  • Loading branch information
annamitr committed May 11, 2021
2 parents 37659fb + e000e09 commit 4ef5c1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dropdown/views/DropdownView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,13 @@ export default class DropdownView {
const indent = this.options.panelOffsetBottom || WINDOW_BORDER_OFFSET;
switch (position) {
case panelPosition.UP:
this.panelEl.style.removeProperty('top');
panelBottom = viewportHeight - buttonRect.bottom + buttonRect.height;
this.panelEl.style.bottom = `${panelBottom}px`;
maxHeight = viewportHeight - panelBottom - indent;
break;
case panelPosition.DOWN:
this.panelEl.style.removeProperty('bottom');
top = buttonRect.top + buttonRect.height;
this.panelEl.style.top = `${top}px`;
maxHeight = viewportHeight - top - indent;
Expand Down

0 comments on commit 4ef5c1c

Please sign in to comment.