Closed
Description
Describe the bug
If a form is rendered outside of SvelteKit's content, and triggers a navigation, the entire page reloads.
This might seem like an absurd thing to care about, but a search form inside of a modal, rendered in a portal is a reasonably common occurrence, and exactly how I discovered this.
Incidentally, form actions appear to work fine. You can post from a form rendered in a portal, and the invalidation appears to work correctly, without the full reload
Reproduction
https://github.com/arackaf/svelte-kit-form-nav-repro
First textbox is rendered inside of SvelteKit, and works correctly.
Second one is rendered in a portal, and triggers a full page reload.
Logs
n/a
System Info
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 208.96 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.11.1 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.11.1/bin/node
Yarn: 1.22.17 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.11.1/bin/yarn
npm: 8.18.0 - ~/Documents/node_modules/.bin/npm
Browsers:
Chrome: 108.0.5359.94
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.90
@sveltejs/kit: next => 1.0.0-next.571
svelte: ^3.53.1 => 3.53.1
vite: ^3.2.4 => 3.2.4
Severity
serious, but I can work around it
Additional Information
No response