You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
feature
What is the current behavior?
There is no $mdSticky for components like md-subheader inside a md-list.
What is the expected behavior?
I would expect a service like $mdSticky from Material v1 to allow components like md-subheader inside a md-list to stick when scrolling.
What is the motivation / use case for changing the behavior?
To provide the same functionality that is present in Material v1.
changed the title [-]Add $mdSticky service to create sticky subheaders and other components.[/-][+]Create helper for sticky positioning[/+]on May 19, 2016
At least the toolbars should be something we can make sticky. It does look much better when the toolbar is always at the top while you scroll the content (in some cases).
@rolandjitsu actually you can do that with layouts. Just use two columns, one for the toolbar and another for a scrollable content. It would be something like that:
@btroncone Thanks for the reminder. This feature hasn't been marked as a high priority for the beta, but I will try to look into it soon - Here is my (pretty old) proposal for this feature.
Currently 14% from the global browser usage doesn't support position: sticky, most of them are 5 years old versions (e.g. IE11 from 2013) https://caniuse.com/#search=sticky
Exactly. To me this helper is mainly supposed to stick and unstick on
scroll. We see this behavior more and more often.
Le ven. 1 juin 2018 14:26, Luiz Machado <notifications@github.com> a écrit :
Angular should work with IE11 so I don't think this will be an actual option for the team. display: sticky only works out the box properly in 5% of the browsers. So even if they didn't have to support IE11, I don't think this is the way to go.
Regardless the scroll behavior, I think this could be easy doable with an scroll event, just changing the position of the sticky component.
As most of sticky positioned stuff is all about layout and does not blocks users of doing anything if it don't work and we have 85% of global support for this feature, I think you'r right.
Activity
[-]Add $mdSticky service to create sticky subheaders and other components.[/-][+]Create helper for sticky positioning[/+]devversion commentedon May 19, 2016
Once this feature will be added, we should test that really thoroughly.
It should also check, if the current browser supports
stickypositions natively.rolandjitsu commentedon Sep 24, 2016
At least the toolbars should be something we can make sticky. It does look much better when the toolbar is always at the top while you scroll the content (in some cases).
jefferson-willian commentedon Nov 28, 2016
@rolandjitsu actually you can do that with layouts. Just use two columns, one for the toolbar and another for a scrollable content. It would be something like that:
btroncone commentedon Jan 10, 2017
Any update or examples of this in practice? This would be a very helpful addition as the majority of MD layouts utilize a sticky header by default. 👍
devversion commentedon Jan 10, 2017
@btroncone Thanks for the reminder. This feature hasn't been marked as a high priority for the beta, but I will try to look into it soon - Here is my (pretty old) proposal for this feature.
btroncone commentedon Jan 10, 2017
That would be amazing, thanks for the feedback and quick response! 👍
trainerbill commentedon Jan 11, 2017
Would this be better implemented in flex-layout?
devversion commentedon Jan 11, 2017
@trainerbill I don't think that you can categorize this into
flex-layoutAs from the name, flex-layout is a set of directives to build a layout using Flexbox CSS - It should be part of Angular Material's component toolkit.
f-mon commentedon Mar 19, 2017
will this feature be implemented?
19 remaining items
jofftiquez commentedon May 25, 2018
Wow I didn't know I got downvoted so hard on this thread hahahaha. There should be a notification for this. Guys! Switch to VueJs! It's better!
I'm kidding of course 😀 Enjoy the breaking changes! 🎆 😛
odahcam commentedon May 25, 2018
Why not to just use
position: stickywith some JS sticky polyfill?reppners commentedon Jun 1, 2018
As @odahcam points out recent browsers have sufficient support for
position: stickyso this feature can be implemented quite easily.Necessary styles:
Personally I don't need to support ancient browsers that are not capable of doing it with pure css so no fancy JS polyfilling needed.
pppdns commentedon Jun 1, 2018
Currently 14% from the global browser usage doesn't support
position: sticky, most of them are 5 years old versions (e.g. IE11 from 2013)https://caniuse.com/#search=sticky
odahcam commentedon Jun 1, 2018
On the other side, I think this sticker helper may aim to add that behavior we see in mobile Chrome app bar that hides and shows up on scroll. 🤔
jeremyputeaux commentedon Jun 1, 2018
michaeljota commentedon Jun 1, 2018
Angular should work with IE11 so I don't think this will be an actual option for the team.
display: stickyonly works out the box properly in 5% of the browsers. So even if they didn't have to support IE11, I don't think this is the way to go.Regardless the scroll behavior, I think this could be easy doable with an scroll event, just changing the position of the sticky component.
paulmelero commentedon Jun 27, 2018
is this issue closed by #11483?
odahcam commentedon Jun 27, 2018
@michaeljota
This certainty would be easy and awesome if it comes with the helper, would be from a great help.
jelbourn commentedon Oct 5, 2018
Closing this since there are no plans to add this feature. We believe that using the native
position: stickyis the best approach moving forward.odahcam commentedon Oct 5, 2018
As most of sticky positioned stuff is all about layout and does not blocks users of doing anything if it don't work and we have 85% of global support for this feature, I think you'r right.
Here's the current support status BTW:
Update Angular CDK and Material to 6.3 (angular#474)
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.