Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-7804: Fix dropdown offsetHeight error when ibexa-main-header not present #1183

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

tischsoic
Copy link
Contributor

Question Answer
JIRA issue https://issues.ibexa.co/browse/IBX-7804
Type bug
Target version v4.6
BC breaks no
Doc needed no

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Asked for a review (ping @ibexa/engineering).

@@ -104,7 +104,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;
Copy link
Contributor Author

@tischsoic tischsoic Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: ibexa-main-header offset was introduced to avoid dropdown popup overlap with the header (screenshots below). If there is no header there is no need to avoid overlap.
Credit: screenshots taken by @GrabowskiM

@tomaszszopinski tomaszszopinski self-assigned this Mar 12, 2024
@tischsoic tischsoic force-pushed the IBX-7804-fix-dropdown-main-header-offsetheight-errror branch from 32fec89 to 1875ecf Compare March 13, 2024 08:30
Copy link

sonarcloud bot commented Mar 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on IbexaDXP 4.6 commerce.

@dew326 dew326 merged commit 178b9ef into main Mar 13, 2024
22 checks passed
@dew326 dew326 deleted the IBX-7804-fix-dropdown-main-header-offsetheight-errror branch March 13, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants