sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7.01k stars 435 forks source link

target="_self" causes a full page reload #1731

Closed yuliankarapetkov closed 3 years ago

yuliankarapetkov commented 3 years ago

Describe the bug Using target="_self" causes a full page reload.

$: target = newWindow ? '_blank' : '_self'

<a {href} {target}>
  Click here
</a>

Expected behavior The link should open in the same browser tab without causing a full page reload but only client-side (re)loading.

Information about your Sapper Installation:

System: OS: macOS 11.2.1

Browsers: Brave Browser: 88.1.20.108 Chrome: 88.0.4324.192 Safari: 14.0.3

npmPackages: rollup: ^2.28.2 => 2.28.2 sapper: ^0.28.8 => 0.28.8 svelte: ^3.27.0 => 3.27.0

Conduitry commented 3 years ago

This is intended - #1540