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

md-menu does not display properly inside md-list #5120

Closed
thebiff999 opened this issue Oct 25, 2023 · 2 comments · Fixed by #5094 · May be fixed by X-oss-byte/pigweed#61
Closed

md-menu does not display properly inside md-list #5120

thebiff999 opened this issue Oct 25, 2023 · 2 comments · Fixed by #5094 · May be fixed by X-oss-byte/pigweed#61
Assignees

Comments

@thebiff999
Copy link

thebiff999 commented Oct 25, 2023

What is affected?

Component

Description

When using the md-list in conjunction with a md-menu, e.g. a three-dot menu for context actions, I would expect the md-menu to display its content and correctly position itself to the provided anchor.
If I create a menu for every md-list-item, e.g. with ngFor in Angular, the menu positions istelf correctly at the anchor element in the end-slot but only renders inside the md-list-item. Any overflow from the menu gets cut off.
If I use a single menu for all md-list-items and change out the anchor element, the menu is shown completely but the positioning appears to be broken when using the default absolute positioning of the menu.

Reproduction

Links to Stackblitz for both approaches
Single Menu
Multiple Menus

Workaround

Setting the positioning fixed property on the md-menu fixes the positioning problem in the single menu approach.
I've not found a workaround for the multiple menu approach, if it is even vallid.

Is this a regression?

Yes. This used to work, but now it doesn't.

Affected versions

1.0.1

Browser/OS/Node environment

Chrome, Safari, Firefox

@asyncLiz
Copy link
Collaborator

CC @e111077 for menu anchor expertise

@e111077
Copy link
Member

e111077 commented Nov 2, 2023

Working on positioning="document" to allow sharing a single menu as it will position itself relative to the document rather than relative to the element.

Also working on positioning="popover" which will use the popover API to enable the inline use case and fallback to positioning="fixed" on Firefox and older browsers that do not support the popover API.

Workaround for now is to use positioning="fixed"

copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 2, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 3, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 3, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
related #5120

PiperOrigin-RevId: 575301929
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
related #5120

PiperOrigin-RevId: 580293404
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 7, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
copybara-service bot pushed a commit that referenced this issue Nov 8, 2023
Uses popover API for browsers that support it. Falls back to fixed positioning on browsers that do not.

fixes #2023
fixes #5120

PiperOrigin-RevId: 578695083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment