From 9a042c59814c4f5afcbc557270b3e7776471f225 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 12 Feb 2018 22:47:25 -0800 Subject: [PATCH] fix virtual list realm --- routes/_components/pseudoVirtualList/PseudoVirtualList.html | 1 + routes/_components/virtualList/VirtualListContainer.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/_components/pseudoVirtualList/PseudoVirtualList.html b/routes/_components/pseudoVirtualList/PseudoVirtualList.html index 0b4fad4..8cb53ee 100644 --- a/routes/_components/pseudoVirtualList/PseudoVirtualList.html +++ b/routes/_components/pseudoVirtualList/PseudoVirtualList.html @@ -61,6 +61,7 @@ if (intersectionObserver) { intersectionObserver.disconnect() } + this.store.setCurrentRealm(null) }, helpers: { isIntersecting(key, $intersectionStates) { diff --git a/routes/_components/virtualList/VirtualListContainer.html b/routes/_components/virtualList/VirtualListContainer.html index cd4450a..732dc28 100644 --- a/routes/_components/virtualList/VirtualListContainer.html +++ b/routes/_components/virtualList/VirtualListContainer.html @@ -10,10 +10,10 @@ export default { oncreate() { mark('onCreate VirtualListContainer') + this.store.setCurrentRealm(this.get('realm')) let node = document.querySelector(this.get('containerQuery')) this.setupScroll(node) this.setupFullscreen() - this.store.setCurrentRealm(this.get('realm')) let scrollTop = this.store.get('scrollTop') if (scrollTop > 0) { this.observe('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight => { @@ -39,6 +39,7 @@ ondestroy() { this.teardownScroll() this.teardownFullscreen() + this.store.setCurrentRealm(null) }, store: () => virtualListStore, methods: {