From 44b5a6a67fae1f4e9187c3c3db42589c42323069 Mon Sep 17 00:00:00 2001 From: Nazar Kanaev Date: Tue, 4 Aug 2020 22:16:44 +0100 Subject: [PATCH] reset content scroll position --- template/index.html | 1 + template/static/javascripts/app.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/template/index.html b/template/index.html index 8ab0bc5..a841247 100644 --- a/template/index.html +++ b/template/index.html @@ -219,6 +219,7 @@

{{itemSelectedDetails.title}}

diff --git a/template/static/javascripts/app.js b/template/static/javascripts/app.js index d84edd8..3dacb87 100644 --- a/template/static/javascripts/app.js +++ b/template/static/javascripts/app.js @@ -243,6 +243,9 @@ var vm = new Vue({ this.itemSelectedDetails = null return } + if (this.$refs.content) { + this.$refs.content.scrollTop = 0 + } this.itemSelectedDetails = this.itemsById[newVal] if (this.itemSelectedDetails.status == 'unread') { this.itemSelectedDetails.status = 'read'