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.

list: z-index preventing function execution on directive inside md-list-item #9676

@mkhbragg

Description

@mkhbragg

Actual Behavior:

  • What is the issue? *

I have an md-list where each md-list-item is comprised of some text followed by a directive which contains the secondary action for that list item. Both the md-list-item and the directive contain functions bound by ng-click to their respective elements. The problem is that only the function bound to md-list-item is executed, even when the directive element is clicked.

When I was using Angular Material 1.0.6, I did not encounter this issue. I am seeing it since switching to v1.1.0.

  • What is the expected behavior?

I expect that when I click on md-list-item the function bound to that item will be executed. When I click on an element contained within md-list-item and specified by the class md-secondary, I expect the function bound to that element to be executed.

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue:

http://codepen.io/mhbragg/pen/YGNZZx?editors=1010

  • Details:

As you can see, the issue only occurs if the element I want to designate as md-secondary is a directive. If, instead of using a directive, I put the template directly inside md-list-item everything works as expected.
I can still use the directive as md-secondary if I update the z-index for md-button and md-secondary-container (as shown in the third column of the codepen). This leads me to believe that between Angular Material v1.0.6 and v1.1.0 there was just a little z-index change that is now throwing off the use of directives.

Angular Versions: *

  • Angular Version: 1.4.9
  • Angular Material Version: 1.1.0

Additional Information:

  • Browser Type: * Chrome
  • Browser Version: * 53.0.2785.116
  • OS: * Mac OSX Yosemite 10.10.5
  • Stack Traces:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions