Skip to content

beforeNavigate does not fire after clicking link with download attribute #9611

@lukearray

Description

@lukearray

Describe the bug

This application has two pages - a home page at / and an about page at /about.
You can click between the two pages using the links in the header, or the links that appear on each page.
Each time you click, BEFORE NAVIGATE IS RUNNING logs to the console.
If you click the PDF Url link at the bottom, beforeNavigate runs as normal, logging BEFORE NAVIGATE IS RUNNING to the console.
The next link you click, beforeNavigate does not run.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-mgk5se?file=src/routes/+page.svelte

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 
    @sveltejs/kit: ^1.5.0 => 1.15.1 
    svelte: ^3.54.0 => 3.58.0 
    vite: ^4.2.0 => 4.2.1

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions