-
Notifications
You must be signed in to change notification settings - Fork 826
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
md-menu/md-select overlay positions itself too far to the left side of the anchor element #5522
Comments
Further info: The problem may be with how There may be other limitations at play here, but I am not aware of them. |
Does this happen outside the catalog as well? If so, can you post a reproduction and the browsers it occurs on? I wasn't able to reproduce in Chrome or Firefox on macOS at https://material-web.dev/components/select/stories/, so it may be an issue just with the inline demos. |
Yes, I randomly encountered the issue while working on an unrelated project.
I can also confirm that the storyboard works properly. In regards to the initial issues in Chrome 122.0.6261.112 (Official Build) (64-bit), here's is a repro . Same repro seems to work fine in Firefox 123.0.1 (64bit), so maybe there are 2 unrelated issues. Both tests have been done in Windows 11. Trying to pinpoint the problem was a pain, however from what I've seen so far it happens only under certain conditions. Perhaps something to do with overflows and scrollbars during position calculations? Setting Changing the On my screen (Chrome 122.0.6261.112) it looks like this: |
What is affected?
Component
Description
When using md-menu with positioning
popover
ordocument
the overlay goes 10ish? pixels too far to the left side of the anchor.The expected behavior would be for the overlay to be left? aligned with the anchor button.
This is also a problem in md-select, which is where I initially noticed the problem.
Reproduction
The problems are visible on the material-web.dev website already
https://material-web.dev/components/menu/#popover-positioned-menus
https://material-web.dev/components/menu/#document-positioned-menus
And the select:
https://material-web.dev/components/select/#usage
Workaround
I have not found a workaround.
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
1.3.0
Browser/OS/Node environment
Browser: Version 122.0.6261.112 (Official Build) (64-bit)
OS: Windows 11 Pro, version 23H2, build 22631.3155
Node version: v20.11.0
npm version: 9.6.7
The text was updated successfully, but these errors were encountered: