perf: scroll to top if tab is changed (#688)

This commit is contained in:
Rémi Marseault 2023-03-03 22:39:10 +01:00 committed by GitHub
parent 19e4eef0b8
commit 763c3d31e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,6 +116,11 @@ export default {
beforeDestroy() {
document.removeEventListener('keydown', this.handleKeyboardShortcut)
},
watch: {
tab() {
window.scrollTo(0, 0)
}
},
methods: {
close() {
this.$router.back()