Skip to content

Commit

Permalink
feat(saved posts): scroll to top on common actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Nov 20, 2021
1 parent 2a703cf commit f4a6dd8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pages/premium/saved-posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export default {
resetCurrentPage() {
this.currentPage = 0
// TODO: Scroll to top until we have page queries
this.scrollToTop()
},
onDomainChange(DOMAIN) {
Expand All @@ -182,6 +185,9 @@ export default {
onPageChange(page) {
this.currentPage = page
// TODO: Scroll to top until we have page queries
this.scrollToTop()
},
onPostTagSelected(tag) {
Expand Down Expand Up @@ -220,6 +226,11 @@ export default {
this.resetCurrentPage()
},
// TODO: Scroll to top until we have page queries
scrollToTop() {
window.scrollTo(0, 0)
},
},
}
Expand Down

0 comments on commit f4a6dd8

Please sign in to comment.