File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 44284428 }
44294429 appendCall(fragment);
44304430 if (elements.length) {
4431- requestAnimationFrame (addBatch);
4431+ setTimeout (addBatch, 0 );
44324432 } else resolve();
44334433 }
44344434 addBatch();
44404440 }
44414441
44424442 setPageTop(top) {
4443- if (getBody(document).scrollTop) {
4444- if (getBody(document).scrollTop != top) {
4443+ let bodyScroll = getBody(document).scrollTop;
4444+ if (bodyScroll) {
4445+ if (Math.abs(bodyScroll - top) > 50) {
44454446 getBody(document).scrollTop = top;
44464447 }
44474448 } else {
4448- if (document.documentElement.scrollTop != top) {
4449+ if (Math.abs( document.documentElement.scrollTop - top) > 50 ) {
44494450 document.documentElement.scrollTop = top;
44504451 }
44514452 }
44844485 window.scrollTo({ top: targetY, behavior: 'instant'});
44854486 targetY = -1;
44864487 }
4487- let lastScrollTop = getBody(document).scrollTop || document.documentElement.scrollTop;
44884488 this.getInsert();
44894489 await this.pageInit(doc, eles);
44904490 var self = this, newEles = [];
45604560 await self.insertElement(collection);
45614561 }
45624562 }
4563- this.setPageTop(lastScrollTop);
45644563 this.pageAction(doc, newEles);
45654564 let enableHistory = this.curSiteRule.history;
45664565 let enableHistoryAfterInsert = false;
You can’t perform that action at this time.
0 commit comments