From f81405e1fda9549789f6715d330035c841ec1d06 Mon Sep 17 00:00:00 2001 From: Kris Zyp Date: Wed, 12 Sep 2012 11:00:26 -0600 Subject: [PATCH] Traverse past hidden nodes before starting iteration --- OnDemandList.js | 4 ++++ 1 file changed, 4 insertions(+) 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