-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Conversation
Correcting dates. This project is only from 2014.
eee175b
to
1e9e15f
Compare
This pull request got all sorts of weird when I rebased my changes on top of master... |
@ryan can you try rebasing again? You accidentally force-pushed your old version of master up yesterday when doing some rebasing. I force-pushed my newer version of master back over the one you pushed and all is well now. If you rebase again it may all work correctly. |
$el.css({position: browserStickySupport, top: '0px'}); | ||
} | ||
|
||
var debouncedCheck = $container.data('$stickyCheck') || $$rAF.debounce(checkElements.bind(undefined, $container)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use angular.bind(context, fn, args)
here. Function.prototype.bind
doesn't exist on android 2.x. Although we don't actually support android 2, I would rather have a way to gracefully show an error on 2.x devices rather than just have the app completely stop due to a simple error like this one.
(function findTargetElement() { | ||
var scroll = $container.scrollTop(); | ||
for(var i = 0; i < orderedElements.length ; ++i) { | ||
if(rect(orderedElements[i].children(0)).bottom > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of .children(0)
here?
This implements #216.
As per suggestion from @matsko, uses native
position: sticky
when possible, otherwise uses a javascript implementation using the new$materialSticky
service.A new directive
material-sticky
is also exposed, which uses the$materialSticky
service.This pull request also makes the
material-subheader
create ah2
for accessibility purposes as per @marcysutton's suggestion. Subsequently, it ups theh2
andh3
inmaterial-list-item
toh3
andh4
respectively.Commit messages will be squashed when approved by the team. Figured it'd be easier to see how it was implemented with individual commits.
Would love suggestions from @ajoslin on ideas for testing
$materialSticky
service, or anyone else who has ideas.Also does anyone have opinion on whether we want to document
material-sticky
directive /$materialSticky
service for usage on the docs?