diff --git a/OnDemandList.js b/OnDemandList.js index b2c80e5bd..37cb19b5c 100644 --- a/OnDemandList.js +++ b/OnDemandList.js @@ -251,6 +251,10 @@ return declare([List, _StoreMixin], { function adjustHeight(preload, noMax){ preload.node.style.height = Math.min(preload.count * grid.rowHeight, noMax ? Infinity : grid.maxEmptySpace) + "px"; } + while(preload && !preload.node.offsetWidth){ + // skip past preloads that are not currently connected + preload = preload.previous; + } // there can be multiple preloadNodes (if they split, or multiple queries are created), // so we can traverse them until we find whatever is in the current viewport, making // sure we don't backtrack