Skip to content

Commit 53feb3f

Browse files
pikoteamanucorporat
authored andcommitted
fix(infinite-scroll): event.timeStamp polyfill for firefox (#10752)
* Event.timeStamp polyfill for firefox * fix(infinite-scroll): event.timeStamp polyfill for firefox
1 parent 999efac commit 53feb3f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/util/scroll-view.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ export class ScrollView {
7676

7777
function scrollCallback(scrollEvent: UIEvent) {
7878
ev.timeStamp = scrollEvent.timeStamp;
79+
// Event.timeStamp is 0 in firefox
80+
if (!ev.timeStamp) {
81+
ev.timeStamp = Date.now();
82+
}
7983

8084
// get the current scrollTop
8185
// ******** DOM READ ****************

0 commit comments

Comments
 (0)