mirror of
https://github.com/VueTubeApp/VueTube
synced 2025-01-05 15:11:13 +00:00
scroll back to top after clicking on a video
This commit is contained in:
parent
6a98cf4f4a
commit
efbbd9e6b1
2 changed files with 7 additions and 4 deletions
|
@ -24,7 +24,7 @@
|
|||
>
|
||||
<!-- element above removes artifacting from things like v-ripple by -->
|
||||
<!-- scrollbox below must be a standalone div -->
|
||||
<div class="scroll-y" style="height: 100%">
|
||||
<div class="scroll-y" ref="pgscroll" style="height: 100%">
|
||||
<nuxt v-show="!search" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -164,5 +164,11 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route() {
|
||||
this.$refs.pgscroll.scrollTop = 0; // scroll back to top when moving to new route
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -119,9 +119,6 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
// scroll back to top after clicking on the video
|
||||
window.scroll(0, 0);
|
||||
|
||||
this.likes = 100;
|
||||
|
||||
this.$youtube.getVid(this.$route.query.v).then((result) => {
|
||||
|
|
Loading…
Reference in a new issue