From dfa2c951d67a64f4e72a0ebca7ff81e40fc25976 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Tue, 5 Jun 2018 22:54:03 +0900
Subject: wip

---
 src/client/app/desktop/views/pages/deck/deck.notes.vue | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

(limited to 'src/client/app/desktop/views/pages/deck/deck.notes.vue')

diff --git a/src/client/app/desktop/views/pages/deck/deck.notes.vue b/src/client/app/desktop/views/pages/deck/deck.notes.vue
index ff871b049d..48be4e585c 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notes.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notes.vue
@@ -73,16 +73,20 @@ export default Vue.extend({
 		}
 	},
 
+	inject: ['getColumn', 'getScrollContainer'],
+
+	created() {
+		this.getColumn().$once('mounted', () => {
+			this.rootEl = this.getScrollContainer();
+			this.rootEl.addEventListener('scroll', this.onScroll);
+		})
+	},
+
 	beforeDestroy() {
-		this.root.removeEventListener('scroll', this.onScroll);
+		this.rootEl.removeEventListener('scroll', this.onScroll);
 	},
 
 	methods: {
-		mount(root) {
-			this.rootEl = root;
-			this.rootEl.addEventListener('scroll', this.onScroll);
-		},
-
 		isScrollTop() {
 			if (this.rootEl == null) return true;
 			return this.rootEl.scrollTop <= 8;
-- 
cgit v1.2.3-freya

