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

md-subheader loses ng-if child elements when becoming sticky on Chrome #8500

Closed
deceze opened this issue May 19, 2016 · 0 comments
Closed

md-subheader loses ng-if child elements when becoming sticky on Chrome #8500

deceze opened this issue May 19, 2016 · 0 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community

Comments

@deceze
Copy link

deceze commented May 19, 2016

Actual behavior:
Using an md-subheader which contains elements dynamically hidden or shown using ng-if, the dynamic elements vanish when the header becomes sticky. It appears the sticky clone of the header does not evaluate and/or update its content. This is reproducible in Chrome, though in Safari it works as expected.

CodePen:
http://codepen.io/anon/pen/ONeMrm?editors=1000

Angular Versions:

  • Angular Version: 1.4.9
  • Angular Material Version: noticed in 1.0.3, continues in latest version

Additional Information:

  • Browser Type: Chrome
  • Browser Version: 50.0.2661.102
  • OS: OS X 10.11.5
@devversion devversion self-assigned this May 19, 2016
@devversion devversion added the needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community label May 19, 2016
devversion added a commit to devversion/material that referenced this issue May 19, 2016
* Currently the subheader was not working properly with `ng-if`'s inside of its content.
  This was caused by a wrong recompile of the already compiled transcluded clone.

* This commit also fixes the meaningless / useless tests.
   Before we never imported the `subheader` module into its tests.
   Also we never tested the $mdSticky service together with the subheader, because
   we had a really ugly mock for the `$mdSticky` service, which just tested the call arguments.

Fixes angular#8500. Closes angular#8504.
@devversion devversion added the has: Pull Request A PR has been created to address this issue label May 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants