Skip to content

md-menu click catcher is fixed to a container. #1499

Closed

Description

@shlomiassaf

Bug, feature request, or proposal:

bug

What is the expected behavior?

The click catcher for md-menu should be applied on the whole screen.

What is the current behavior?

<div class="md-menu-click-catcher"></div>

The click catcher element is located within the menu directive this means that in some situations the fixed viewport is not the body but some element in the DOM tree between the body and the click catcher.
This can happen when an element (ancestor of css catcher) applies CSS transform. When this happen the click catcher will be bound to the element's view port and not the body.

A great example is the SideNav, the sidenav's content element applies a transform: translate3d(0px, 0px, 0px); and when opened the margin-left CSS property reduce's the content size thus reduces the click catcher size, in this scenario clicks over the sidebar navigation are will not trigger a close event. (hovers will works as well... etc)

The menu is rendered in the the overlay container area but its not using the overlay backdrop, I guess since you can't control the styling of the backdrop to make it transparent...

Activity

  1. shlomiassaf commented on Oct 14, 2016

    @shlomiassaf
    ContributorAuthor

    Another issue related to the click catcher element is when a menu item has a routerLink that tat points to a route that does not exist. This will trigger an exception.

    When this happens the click catcher is not removed, if the click catcher is not inside a router outlet (above it) the whole app becomes non responsive (can't click)

  2. fxck commented on Oct 14, 2016

    @fxck
    Contributor

    related
    #998
    #1417
    #1410

  3. shlomiassaf commented on Oct 14, 2016

    @shlomiassaf
    ContributorAuthor

    The issue is really using a backdrop inside the menu content but creating the dom element inside the overlay container.

    The right solution is to use the overlay's backdrop and being able to control the backdrop background color

  4. added this to the alpha.10 milestone on Oct 18, 2016
  5. jelbourn commented on Oct 18, 2016

    @jelbourn
    Contributor

    The current behavior is just temporary until menu uses the Overlay's backdrop.

  6. added
    P3
    on Oct 18, 2016
  7. jelbourn commented on Oct 27, 2016

    @jelbourn
    Contributor

    Closed via #1534

  8. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions