mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
refresh blink fix
This commit is contained in:
parent
63d1a6bd9c
commit
076e37847c
1 changed files with 3 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
|||
export default defineNuxtRouteMiddleware((to, from) => {
|
||||
useNuxtApp().hook('page:finish', () => {
|
||||
if (history.state.scroll) {
|
||||
setTimeout(() => window.scrollTo(history.state.scroll), 0);
|
||||
if (to.path !== from.path && history.state) {
|
||||
window.scrollTo(history.state.scroll);
|
||||
} else {
|
||||
setTimeout(() => window.scrollTo(0, 0), 0);
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue