Skip to content

Scroll to Top button not available on Currency Converter page #1035

@Eshajha19

Description

@Eshajha19

Title

Scroll to Top button not working on Currency Converter page

Description

The "Scroll to Top" button on the Currency Converter page is not functioning as expected. The button either does not appear after scrolling or does not scroll the page back to the top when clicked.

Steps to Reproduce

  1. Go to the Currency Converter page.
  2. Scroll down the page.
  3. Observe the Scroll to Top button behavior.
  4. Click the button (if visible).

Expected Behavior

The Scroll to Top button should appear after the user scrolls down and smoothly scroll the page back to the top when clicked.

Actual Behavior

The button either:

  • Does not appear after scrolling, or
  • Appears but does not scroll the page to the top.

Possible Cause

The issue might be related to JavaScript event handling, missing scroll listener, or incorrect element ID/class.

Suggested Fix

Ensure that:

  • A scroll event listener is added to detect page scrolling.
  • The button visibility toggles after a certain scroll threshold.
  • The click event triggers window.scrollTo({ top: 0, behavior: "smooth" }).

Environment

  • Browser: Any
  • Page: Currency Converter
  • Device: Desktop / Mobile

Additional Context

Adding a properly styled and functional Scroll to Top button would improve navigation and user experience on long pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions