Skip to content

Logout button scrolls page to top due to href="#" #1437

@htssp

Description

@htssp

Issue: Logout link scrolls page to top before redirect

When clicking Logout from the global navigation menu, the browser briefly scrolls the page to the top.
This occurs because the HTML contains href="#" which triggers
default navigation behavior.

Image

Current Behavior

  • Clicking Logout triggers a scroll jump before redirecting
  • Happens inconsistently depending on viewport position + response time

Expected Behavior

  • Clicking Logout should smoothly trigger logout without scroll jump

Observations

  • The issue may not always be visible on fast local/dev servers
  • The scroll jump may occur more often in production or on slow networks
  • Inspecting code showed the root cause (href="#")

Proposed Fix
Replace <a href="#"> with a <button type="button">
and keep existing logout logic with @click.prevent="handleLogout".

Verification

  • Tested locally
  • No UI change
  • Logout still works as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions