Skip to content

Astro View Transition handles link with hash incorrectly #15086

@CHooverShrimp

Description

@CHooverShrimp

Astro Info

Astro                    v5.16.6
Vite                     v6.4.1
Node                     v22.16.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             astro-icon (v1.1.5)

If this issue only occurs in one browser, which browser is a problem?

Checked on Chrome and Firefox.

Describe the Bug

When clicking on an anchor <a> with a hash href, the user is taken to the page, but the hash portion culled.
The culprit is the Astro View Transiiton. When I exclude it for anchors with hashes, it works.

example:
<a href="/articles#news"> --> example.com/articles/

What's the expected result?

I expect the astro transition to work with the hash on the link.
<a href="/articles#news"> --> example.com/articles#news

Link to Minimal Reproducible Example

https://dfa57449.marefair-org-2026.pages.dev/

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions