Skip to content

Commit

Permalink
fix(infinite-scroll): event.timeStamp polyfill for firefox (#10752)
Browse files Browse the repository at this point in the history
* Event.timeStamp polyfill for firefox

* fix(infinite-scroll): event.timeStamp polyfill for firefox
  • Loading branch information
pikotea authored and manucorporat committed Mar 15, 2017
1 parent 999efac commit 53feb3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/scroll-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export class ScrollView {

function scrollCallback(scrollEvent: UIEvent) {
ev.timeStamp = scrollEvent.timeStamp;
// Event.timeStamp is 0 in firefox
if (!ev.timeStamp) {
ev.timeStamp = Date.now();
}

// get the current scrollTop
// ******** DOM READ ****************
Expand Down

0 comments on commit 53feb3f

Please sign in to comment.