From d0147cb03e9f353893e5a936808697de46e5df07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 13 Oct 2020 10:48:48 +0200 Subject: [PATCH] Revert "Do not scroll cards into view" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit abf67138e7c97ef4e61defc4504e0baf7fa6311a. Signed-off-by: Julius Härtl --- src/components/cards/CardItem.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/cards/CardItem.vue b/src/components/cards/CardItem.vue index 92f3aa762..f2aaabacc 100644 --- a/src/components/cards/CardItem.vue +++ b/src/components/cards/CardItem.vue @@ -131,6 +131,13 @@ export default { return [...this.card.labels].sort((a, b) => (a.title < b.title) ? -1 : 1) }, }, + watch: { + currentCard(newValue) { + if (newValue) { + this.$nextTick(() => this.$el.scrollIntoView()) + } + }, + }, methods: { openCard() { const boardId = this.card && this.card.boardId ? this.card.boardId : this.$route.params.id