-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input fields are cleared when JS finished loading #258
Comments
This is not a Superforms issue, but is more general; if you use |
Oh, I am sorry, you are right. Will move it to the svelte repo! |
Hi! I am running into the exact same problem: in my tests, my form is reset after Playwright has already filled the values, and thus the subsequent test('when password is too short', async ({ page, pom: { password } }) => {
// Form is reset if the following line is removed
await page.waitForTimeout(1000)
await password.fill('short')
await password.blur()
await expect(page.getByText('String must contain at least 6 character(s)')).toBeVisible()
}) I understand that this issue is not caused directly by Superforms, but I did not find a relevant issue in Svelte or SvelteKit repos (maybe I missed it :-\ ). |
To anyone passing by and wondering where this issue is, I finally found it 😄 |
Description
When the internet speed is fairly slow, JS is enabled and the user types in text into input fields, these values get reset as soon as the JS finished loading.
See the following screenshot of the final loading state when entering "test" into both input fields as soon as they were interactable while setting throttling to "Fast 3G".
If applicable, a MRE
I created https://github.com/Gerschtli/superforms-bug-input-values-reset-on-load to reproduce the issue (on stackblitz it was not reproducible).
pnpm install
pnpm dev -- --open
console.log
statement)The text was updated successfully, but these errors were encountered: