BUGFIX: Fix dimension dropdown on browser zoom #3693
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #3639
What I did
I had a look at why the language dropdown disappears when the browser is zoomed out.
How I did it
The SelectBox is loading DropDown.Contents with scrollable="true" which triggers a check if the element is out of bound.
The check for const elementBoundingBox = el.getBoundingClientRect(); is returning -0.05 for top when I zoom out 80% and thus is "out of bounds" of the viewport. There is apparently some css that makes the dimensions dropdown slightly higher than the right topbar.
I could not find a good reason why the Element is out of bounds by 0.05, perhaps there is a better solution?
To resolve the issue, I placed the dimensions menu at the top of the bar, thus it cannot go over the top of the bar.
How to verify it
When zooming out, the dimensions menu is visible again:
Before that, Menu was not opening:
Also, I checked on desktop without browser zoom and there was no visible change in styling with the additional CSS