nuxt-ui-pro / saas

A SaaS template made with Nuxt UI Pro.

Home Page:https://saas-template.nuxt.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Page jumps when you click on a link

gkTim opened this issue · comments

Hi,

first at all, great template! Love it!

I have found one behaviour which is not so nice, the page jumps to the top when you navigate a link and nagivates after that.
Its a small thing but could lead to confusion for users with small connections.

Steps to reproduce:

  1. Open the page and scroll down.
  2. Click on a link e.g. the "Buy now" button or the "Signup"-Button in the header.

Current Behaviour:

Page jumps to the top and navigates after that.

Expected Behaviour:

Page navigates to the new link and reset to to after that with no animation.

I have tested it on Chrome and Safari

This is the default behaviour of the app/router.options.ts provided by @nuxt/ui-pro. Since the https://github.com/nuxt/ui-pro/releases/tag/v1.1.0 release, you can disable this behaviour and handle it manually:

export default defineNuxtConfig({
  uiPro: {
    routerOptions: false
  }
})