aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-09 10:33:21 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-09 10:33:21 +0100
commit0eeccb87cef4d137710e3c7fd215b94e45aff3d1 (patch)
tree584085071af589e58f79ffb67051c49b6bd883bb /src/main.js
parent290180a987ecb4949fc877c512f3cff120bcbc70 (diff)
parent64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff)
Merge branch 'develop' into feature/hash-routed
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.js b/src/main.js
index 0783749e..9a3406e3 100644
--- a/src/main.js
+++ b/src/main.js
@@ -53,7 +53,7 @@ const routes = [
{ path: '/main/all', component: PublicAndExternalTimeline },
{ path: '/main/public', component: PublicTimeline },
{ path: '/main/friends', component: FriendsTimeline },
- { name: 'conversation', path: '/notice/:id', component: ConversationPage },
+ { name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } },
{ name: 'user-profile', path: '/users/:id', component: UserProfile },
{ name: 'mentions', path: '/:username/mentions', component: Mentions },
{ name: 'settings', path: '/settings', component: Settings }
@@ -62,6 +62,9 @@ const routes = [
const router = new VueRouter({
routes,
scrollBehavior: (to, from, savedPosition) => {
+ if (to.matched.some(m => m.meta.dontScroll)) {
+ return false
+ }
return savedPosition || { x: 0, y: 0 }
}
})