This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
subheader: causes child attribute directives to be linked twiceΒ #11865
Copy link
Copy link
Open
Labels
P5: nice to haveThese issues will not be fixed without community contributions.These issues will not be fixed without community contributions.
Milestone
Description
Bug, enhancement request, or proposal:
CodePen and steps to reproduce the issue:
Link Error Example which demonstrates the issue:
Detailed Reproduction Steps:
- Create an md-subheader with a child div that has an attribute directive
What is the expected behavior?
The div will be transcluded once and then its attribute directives will be linked once
What is the current behavior?
It seems that the div is transcluded twice and then one of those transclusions is immediately removed from the DOM without triggering a $destroy event.
What is the use-case or motivation for changing an existing behavior?
This can cause event bindings via attribute directives to be fired tiwce.
Which versions of AngularJS, Material, OS, and browsers are affected?
Currently on 1.1.21
- AngularJS: 1.7.9
- AngularJS Material: 1.1.21
- OS: osx
- Browsers: Chrome / Safari / Firefox
Is there anything else we should know? Stack Traces, Screenshots, etc.
Strangely, the $destroy event is called when the actual transcluded element is destroyed, so this doesn't leave any orphaned event bindings if your own $destroy events are set up properly.
bersLucas
Metadata
Metadata
Assignees
Labels
P5: nice to haveThese issues will not be fixed without community contributions.These issues will not be fixed without community contributions.