-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Labels
Description
Code of conduct
- I agree to follow this project's code of conduct.
Impacted component(s)
Overlay, VirtualTrigger
Expected behavior
Overlay should always be positioned and rendered at the screen that all content is visible.
Actual behavior
When using a virtual trigger to open a context menu with placement="right-start" - it happens that the overlay content won't be correct positioned and always visible for small window sizes - and content will get cut off the screen.
This is mostly the case when the opened popover content width is >= half of the UI viewport. For example: If the popover width is 300px, this happens when viewport (body) is shrank to 600px and less.
Screenshots
What browsers are you seeing the problem in?
Chrome Version 99.0.4844.84
How can we reproduce this issue?
- Go to https://webcomponents.dev/edit/ohZswGWTi4aHOb1GUd4X
- Click on "ContextMenu Trigger"
- Shrink page width (to about 600px or less)
- Click again on trigger button (around phrase "Context" of ContextMenu Trigger)
- Notify context menu content cut off page
You may try to set placement to "left-start" and there won't be a problem.
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response