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

[menu-bar] sub-menu overlay wrongly placed in some phones #8092

Open
DiegoCardoso opened this issue Nov 5, 2024 · 0 comments · May be fixed by #8116
Open

[menu-bar] sub-menu overlay wrongly placed in some phones #8092

DiegoCardoso opened this issue Nov 5, 2024 · 0 comments · May be fixed by #8116

Comments

@DiegoCardoso
Copy link
Contributor

Description

When a sub-menu is opened for some phones (e.g. iPhone 13 Pro Max), the overlay is misplaced at the top-left corner.

That happens because, although the device is correctly detected and the phone attribute is added to the overlay, the _updatePosition method in the vaadin-overlay-position-mixin sets values for justify-content and align-items that overrides the ones set by the :host([phone]) selector:

image

In smaller phones, the overlay correctly opens on the bottom of the page because they are detected by the @media query for small devices:
image

Expected outcome

Either the sub-menu opens on the bottom of the screen as it happens in other mobile devices (preferably) or it's correctly placed relative to the parent menu item.

Minimal reproducible example

It can be seen in the dev/menu-bar.html page

Steps to reproduce

I wasn't able to verify this on my iPhone 13, but with the iOS Simulator:

  1. Open the dev/menu-bar.html page
  2. Click on the "Share" item

Environment

Vaadin version(s): 23+
OS: iOS (Probably can be verified in bigger phones running Android as well)

Browsers

Safari on iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant