Skip to content

Commit

Permalink
IBX-7804: Fix dropdown offsetHeight error when ibexa-main-header not …
Browse files Browse the repository at this point in the history
…present
  • Loading branch information
tischsoic committed Mar 13, 2024
1 parent 86fc9cc commit 1875ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bundle/ui-dev/src/modules/common/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Dropdown = ({
itemsStyles.maxHeight = window.innerHeight - bottom - ITEMS_LIST_SITE_MARGIN;
} else {
const headerContainer = document.querySelector('.ibexa-main-header');
const headerHeight = headerContainer.offsetHeight;
const headerHeight = headerContainer?.offsetHeight ?? 0;

itemsStyles.top = top - ITEMS_LIST_WIDGET_MARGIN;
itemsStyles.maxHeight = top - headerHeight - ITEMS_LIST_SITE_MARGIN;
Expand Down

0 comments on commit 1875ecf

Please sign in to comment.