Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

[MDCMenuSurface] Add feature to prevent mdc-menu-surface from closing with outside clicks  #7886

Closed
@Ilanaya

Description

Feature Request

Encountered the case of opening a full-screen modal from mdc-menu. Both menu and modal should stay opened regardless of any user interactions(clicks in my case) in the modal area. Right now the handleBodyClick method intercepts user clicks and immediately closes mdc-menu, which is now what is want to happen. Please ask an example/more detailed explanation to reproduce if something is unclear.

Proposed solution

Add native ability for disabling greedy body click listener

Additional context

Solved this with manual removal of the body event listener with deregisterBodyClickListener when opening a modal and then add it again when modal is closed, but this doesn't look like a good solution for me.
This might be considered as duplicate of #6188 but here I have a slightly different case, so decided to open a new one

Metadata

Assignees

No one assigned

    Labels

    Unresolved (Archived)Open and unresolved issues and PRs that were closed due to archiving the repository.feature-request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions