diff --git a/lib/elements/dom-repeat.js b/lib/elements/dom-repeat.js index 7b2d1dbee2..27d2f79728 100644 --- a/lib/elements/dom-repeat.js +++ b/lib/elements/dom-repeat.js @@ -544,7 +544,10 @@ export class DomRepeat extends domRepeatBase { const limit = this.__calculateLimit(isntIdxToItemsIdx.length); // Create, update, and/or remove instances this.__updateInstances(items, limit, isntIdxToItemsIdx); - // If we're chunking, schedule a rAF task to measure/continue chunking + // If we're chunking, schedule a rAF task to measure/continue chunking. + // Do this before any notifying events (renderedItemCount & dom-change) + // since those could modify items and enqueue a new full render which will + // pre-empt this measurement. if (this.initialCount && (this.__shouldMeasureChunk || this.__shouldContinueChunking)) { this.__debounceRender(this.__continueChunkingAfterRaf);