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

Commit d8e5079

Browse files
committed
fix(subheader): sort items correctly in browsers that dont support true/false
Closes #438
1 parent 9afe28a commit d8e5079

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/components/sticky/sticky.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function MdSticky($document, $mdEffects, $compile, $$rAF, $mdUtil) {
126126
// be the same as their order of display.
127127
self.items.forEach(refreshPosition);
128128
self.items = self.items.sort(function(a, b) {
129-
return a.top > b.top;
129+
return a.top < b.top ? -1 : 1;
130130
});
131131

132132
// Find which item in the list should be active,
@@ -161,8 +161,6 @@ function MdSticky($document, $mdEffects, $compile, $$rAF, $mdUtil) {
161161
current = current.offsetParent;
162162
}
163163
item.height = item.element.prop('offsetHeight');
164-
165-
item.clone.css('margin-left', item.left + 'px');
166164
}
167165

168166

0 commit comments

Comments
 (0)