-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Dangling md-subheader and md-toolbar #2825
Comments
If the subheader's parent `<md-content>` was not the top-level item, the stickied subheader would be incorrectly positioned further down the page. Also added more tests to toolbar and fixed issue to ensure subheader works with a toolbar using `md-scroll-shrink`. Fixes #4420. References #2825. Closes #4439.
@nobarany Recent updates to Angular Material (and Bower-Material) may already solve this issue. When you have a chance, can you use the latest code in master and confirm if the issue is resolved If not, please provide a CodePen demo that will ensure we validate fixes that also match your needs. |
If the subheader's parent `<md-content>` was not the top-level item, the stickied subheader would be incorrectly positioned further down the page. Also added more tests to toolbar and fixed issue to ensure subheader works with a toolbar using `md-scroll-shrink`. Fixes #4420. References #2825. Closes #4439. Conflicts: src/components/toolbar/toolbar.js src/components/toolbar/toolbar.spec.js
If the subheader's parent `<md-content>` was not the top-level item, the stickied subheader would be incorrectly positioned further down the page. Also added more tests to toolbar and fixed issue to ensure subheader works with a toolbar using `md-scroll-shrink`. Fixes angular#4420. References angular#2825. Closes angular#4439.
Can you please provide a demo using the latest master code about exactly what you are attempting to accomplish? I believe your first issue has been addresses, but I'm not exactly sure what you're wanting your second and third demos to do. |
Yes, the first one works now, thanks! In the second demo, there are two toolbars: the first one is supposed to shrink as user scrolls down and the second one is supposed to stick to the top of the page. It still doesn't work (with the latest master code from gitcdn.xyz): |
Okay, so I think you have three options here:
Do any of those meet your needs, or are you trying to do something else? In general, the |
Well, # 2 and 3 work for my needs. Thanks! But they shouldn't! The expected behavior is that the toolbar with md-shrink should shrink, not the other one. Am I missing something? |
The toolbars with So, using Since the most common case was to handle a single toolbar, that is what we optimized for. If we see a lot of people using it in a different manner, we may consider altering this and/or adding a new option. If this is something you would like to see, could you please open a new issue with a description and ideally a video or Codepen of the effect you are wanting to create? Since the original subheader issue is fixed, and we have a workaround for the second, I am going to go ahead and close this issue. |
It works for me, thanks. |
When a md-toolbar with md-scroll-shrink shrinks, the following subheader or md-toolbar doesn't move up to the top of the page, and it just dangles in the middle.
This codepen shows the problem for subheader, which appears only in Chrome (related to issues #1647 and #1726):
http://codepen.io/anon/pen/rVeaaL
But the problem with a second toolbar happens in Firefox as well:
http://codepen.io/anon/pen/QbNwQj
Interestingly, by adding md-scroll-shrink to the second toolbar you can achieve the behavior that you'd expect from the above code (i.e., the second one doesn't shrink).
http://codepen.io/anon/pen/MwyYvj
The text was updated successfully, but these errors were encountered: