Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

md-menu offset not calculating correctly #8080

@tspayne87

Description

@tspayne87

When you open a menu and you do not have a ng-click before the md-menu-contents tag it will get the first ng-click that may exist within the menu itself. I was using data-ng-click to open my menu which is not being picked up by the init function. I have a fix for this and its adding in the data-ng-click into the querySelector, an example is

Current:
triggerElement = $element[0].querySelector('[ng-click],[ng-mouseenter]');

Change To:
triggerElement = $element[0].querySelector('[data-ng-click],[ng-click],[data-ng-mouseenter],[ng-mouseenter]');

this is all within the init function in the MenuController. I have tested this within my project and it seems to of fixed the issue for me. I hope this helps.

Metadata

Metadata

Assignees

Labels

has: Pull RequestA PR has been created to address this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions