Skip to content

Commit 9164c37

Browse files
committed
Added comments
1 parent f154e03 commit 9164c37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/sticky-header/sticky-header-dir.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ export class CdkStickyHeader implements OnDestroy, AfterViewInit {
210210
if (supportList.length === 0) {
211211
this.isStickyPositionSupported = false;
212212
} else {
213+
// Only need supportList[0], Because supportList contains all the prefix
214+
// that can make sticky positioning work in the current browser.
215+
// We only need to get one prefix and make position: prefix + 'sticky',
216+
// then sticky position will work.
213217
let prefix: string = supportList[0];
214218

215219
this.element.style.top = '0px';

0 commit comments

Comments
 (0)