You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -380,13 +362,9 @@ describe('uiScroll', function () {
380
362
},
381
363
function(viewport){
382
364
viewport.scrollTop(viewportHeight+itemHeight);
383
-
viewport.trigger('scroll');
384
-
385
365
viewport.scrollTop(viewportHeight+itemHeight*2);
386
-
viewport.trigger('scroll');
387
366
388
367
expect(spy.calls.all().length).toBe(4);
389
-
390
368
expect(spy.calls.all()[0].args[0]).toBe(1);
391
369
expect(spy.calls.all()[1].args[0]).toBe(4);//last full
392
370
expect(spy.calls.all()[2].args[0]).toBe(-2);
@@ -413,13 +391,8 @@ describe('uiScroll', function () {
413
391
},
414
392
function(viewport){
415
393
viewport.scrollTop(0);//first full, scroll to -2
416
-
viewport.trigger('scroll');
417
-
418
394
viewport.scrollTop(0);//last full, scroll to -5, bof is reached
419
-
viewport.trigger('scroll');
420
-
421
395
viewport.scrollTop(0);//empty, no scroll occurred (-8)
422
-
viewport.trigger('scroll');
423
396
424
397
expect(spy.calls.all().length).toBe(5);
425
398
expect(spy.calls.all()[0].args[0]).toBe(1);
@@ -468,16 +441,14 @@ describe('uiScroll', function () {
468
441
expect(documentScrollBubblingCount).toBe(1);
469
442
470
443
viewport.scrollTop(0);
471
-
viewport.trigger('scroll');
472
444
473
445
wheelEventElement.dispatchEvent(getNewWheelEvent());//now we are at the top but preventDefault is occurred because of bof will be reached only after next scroll trigger
474
446
expect(documentScrollBubblingCount).toBe(2);//here! the only one prevented wheel-event
475
447
476
448
wheelEventElement.dispatchEvent(getNewWheelEvent());//preventDefault will not occurred but document will not scroll because of viewport will be scrolled
477
449
expect(documentScrollBubblingCount).toBe(3);
478
450
479
-
viewport.scrollTop(0);
480
-
viewport.trigger('scroll');//bof will be reached right after that
451
+
viewport.scrollTop(0);//bof will be reached right after that
481
452
482
453
wheelEventElement.dispatchEvent(getNewWheelEvent());//preventDefault will not occurred because of we are at the top and bof is reached
483
454
expect(documentScrollBubblingCount).toBe(4);
@@ -513,7 +484,6 @@ describe('uiScroll', function () {
0 commit comments