Skip to content

Commit

Permalink
Calculating the size of the dropdown element has been changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Dębiński committed Sep 1, 2023
1 parent cfe2a64 commit bfeaa76
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,9 @@
}

if (this.itemsContainer.closest(SELECTOR_MODAL)) {
const heightModal = this.itemsContainer.closest('.modal-content').getBoundingClientRect().height;
const leftToBottom = heightModal - itemsContainerTop;
const modalHeight = this.itemsContainer.closest('.modal-content').getBoundingClientRect().height;

if (leftToBottom < itemsContainerTop) {
return leftToBottom;
}

return itemsContainerTop - DROPDOWN_MARGIN;
return modalHeight - itemsContainerTop;
}

return documentElementHeight - itemsContainerTop - DROPDOWN_MARGIN;
Expand Down

0 comments on commit bfeaa76

Please sign in to comment.