Skip to content

Commit

Permalink
fix: Removed scroll saved position
Browse files Browse the repository at this point in the history
  • Loading branch information
Natanael Rodriguez Ramos authored and Natanael Rodriguez Ramos committed Apr 23, 2024
1 parent 7eef3fa commit c289e28
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
tag="button"
class="btn btn-solid pay-button"
:to="{ name: 'add-funds-cc', params: { price: price.id } }"
@click.native="scrollToTop"
>
<div class="credit-card-icon"></div>
Credit Card
Expand All @@ -32,7 +31,6 @@
tag="button"
class="btn btn-solid pay-button"
:to="{ name: 'add-funds-paypal', params: { price: price.id } }"
@click.native="scrollToTop"
>
<div class="paypal-icon"></div>
PayPal
Expand All @@ -41,7 +39,6 @@
tag="button"
class="btn btn-solid pay-button"
:to="{ name: 'add-funds-bitcoin', params: { price: price.id } }"
@click.native="scrollToTop"
>
<div class="bitcoin-icon"></div>
Bitcoin
Expand All @@ -50,7 +47,6 @@
tag="button"
class="btn btn-solid pay-button"
:to="{ name: 'add-funds-monero', params: { price: price.id } }"
@click.native="scrollToTop"
>
<div class="monero-icon"></div>
Monero
Expand All @@ -59,7 +55,6 @@
tag="button"
class="btn btn-solid pay-button"
:to="{ name: 'add-funds-cash', params: { price: price.id } }"
@click.native="scrollToTop"
>
<div class="cash-icon"></div>
Cash
Expand Down Expand Up @@ -118,9 +113,6 @@ export default {
toggleMoreOptions() {
this.more = !this.more;
},
scrollToTop() {
window.scrollTo(0,0);
},
},
};
</script>
Expand Down
6 changes: 1 addition & 5 deletions src/themes/ivpn-v3/assets/js/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,7 @@ const router = createRouter({
routes,
store,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else {
return { x: 0, y: 0 }
}
return { x: 0, y: 0 }
}
})

Expand Down
9 changes: 2 additions & 7 deletions src/themes/ivpn-v3/assets/js/views/Account/AddFunds.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<div v-if="!isLight" class="payment-page-header">
<div class="back-link">
<router-link :to="{ name: 'account' }" v-if="account.is_new" @click.native="scrollToTop">
<router-link :to="{ name: 'account' }" v-if="account.is_new">
<span class="icon-back"></span>Select payment method
</router-link>
<router-link :to="{ name: 'payment' }" v-else @click.native="scrollToTop">
<router-link :to="{ name: 'payment' }" v-else>
<span class="icon-back"></span>Select payment method
</router-link>
</div>
Expand Down Expand Up @@ -74,11 +74,6 @@ export default {
window.location = "/light";
}
},
methods: {
scrollToTop() {
window.scrollTo(0,0);
},
},
};
</script>

Expand Down

0 comments on commit c289e28

Please sign in to comment.