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

BUGFIX: Fix dimension dropdown on browser zoom #3693

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

pKallert
Copy link
Contributor

@pKallert pKallert commented Jan 22, 2024

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:
Bildschirmfoto 2024-01-22 um 14 23 53
Before that, Menu was not opening:
Bildschirmfoto 2024-01-22 um 14 25 31

Also, I checked on desktop without browser zoom and there was no visible change in styling with the additional CSS

@github-actions github-actions bot added Bug Label to mark the change as bugfix 8.4 labels Jan 22, 2024
@pKallert pKallert changed the title Bugfix: fix dropdown on browser zoom Bugfix: fix dimension dropdown on browser zoom Jan 22, 2024
Copy link
Contributor

@grebaldi grebaldi left a comment

Choose a reason for hiding this comment

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

Hi @pKallert,

thanks for taking care of this issue :)

I was able to reproduce that (indeed very weird) behavior and can verify that your change fixes it 👍

@grebaldi grebaldi linked an issue Jan 22, 2024 that may be closed by this pull request
@markusguenther
Copy link
Member

Thanks @pKallert, but I guess we should target 8.3 here :)

@pKallert pKallert changed the base branch from 8.4 to 8.3 January 26, 2024 06:03
@github-actions github-actions bot added 8.3 and removed 8.4 labels Jan 26, 2024
@pKallert
Copy link
Contributor Author

Thanks @pKallert, but I guess we should target 8.3 here :)

I switeched it out 👍

@markusguenther markusguenther changed the title Bugfix: fix dimension dropdown on browser zoom BUGFIX: Fix dimension dropdown on browser zoom Jan 26, 2024
@markusguenther
Copy link
Member

Thanks for taking care 💙

@markusguenther markusguenther merged commit 7476ee9 into neos:8.3 Jan 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.3 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DimensionSwitcher dropdown not visible at specific zoom levels
3 participants