Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: not being scrolled to anchor links when using x-splade-link #507

Open
ibrunotome opened this issue Aug 21, 2023 · 0 comments
Open

bug: not being scrolled to anchor links when using x-splade-link #507

ibrunotome opened this issue Aug 21, 2023 · 0 comments

Comments

@ibrunotome
Copy link
Contributor

ibrunotome commented Aug 21, 2023

  • Laravel Version: v10.19.0
  • PHP Version: 8.2.5
  • Splade JS Version (pnpm): 1.4.16([email protected])([email protected])
  • Splade PHP Version (composer): 1.4.16
  • Dev environment: macOS, Docker ibrunotome/php:8.2-swoole, chrome

Description:

Anchor links using <x-splade-link are not being scrolled to the anchor id

Example:

You're in footer of the hoem page, and there is a link with a anchor:

<li>
  <x-splade-link href="{{ route('ranking.index') }}#minhas-conquistas"
    class="text-sm leading-6 text-gray-300 hover:text-white">
    Minhas Conquistas
  </x-splade-link>
</li>

You'll be redirected to the top of the page instead of the page scrolled to the anchor.

Steps To Reproduce Issue:

  • Create two pages and put a id="anything" into an element on the bottom of the second page.
  • Put a link in the first page with an anchor to the id created above: ex: <x-splade-link href="/page-2#anything">Click Me</x-splade-link>
  • Click in the link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant