Skip to content

SvelteKit reloads pages and clears form data on mobile  #4238

@mharding7va

Description

@mharding7va

Describe the bug

I have an issue on mobile (iOS/iPhone). I'm developing a form that has text inputs. If I enter some data and swipe to a different app for a short while, when I swipe back to the SvelteKit app, it refreshes the page and clears all the form inputs. Just tested and this even happens if I simply add an input the index.svelte of the skeleton app after a fresh SvelteKit install.

This does not seem to happen with Svelte apps. Only SvelteKit apps.

Mobile ONLY! Desktop apps are fine

Reproduction

Install the skeleton SvelteKit app.
Add an input to the index.svelte page.
Run the app
Enter some data in the form input
Switch to another app
Wait 5+ seconds
Switch back to the SvelteKit app
Watch the form data clear...

Logs

No response

System Info

System:
    OS: macOS 12.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 48.90 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.5.0 - /usr/local/bin/node
    npm: 8.5.1 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 98.1.35.104
    Chrome: 98.0.4758.109
    Firefox: 97.0.1
    Safari: 15.2
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.30 
    @sveltejs/kit: next => 1.0.0-next.292 
    svelte: ^3.44.0 => 3.46.4

Severity

blocking all usage of SvelteKit

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked by upstreambugSomething isn't workingp2-nice-to-haveSvelteKit cannot be used by a small number of people, quality of life improvements, etc.vite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions