Skip to content
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

Bound value on required input sets :invalid state in Firefox #5285

Closed
ellell opened this issue Aug 18, 2020 · 4 comments
Closed

Bound value on required input sets :invalid state in Firefox #5285

ellell opened this issue Aug 18, 2020 · 4 comments

Comments

@ellell
Copy link

ellell commented Aug 18, 2020

Describe the bug
When binding an empty (undefined or null) value to an input :invalid style state is triggered on initial load in Firefox. It looks like this was fixed in #1233 but seems to be broken again.

To Reproduce
Works in version 3.9.0 REPL
But not in latest version REPL

Information about your Svelte project:
Firefox 78.0.2

Severity
It's a little annoying, I can work around it by not using the required field or simply accepting the red border for now though.

@Glench
Copy link

Glench commented Dec 19, 2020

also running into this! although I'm getting it when hydrating with undefined props from SSR.

@danphil
Copy link

danphil commented Mar 1, 2021

Still happening on Firefox 86 and Svelte 3.34.0. I've been working around this for a while by resetting the form after mount, as seen in this REPL

Note: this doesn't help with forms that are initially populated on some inputs as the reset will clear the data

Seems to be related to #3569, #4849, etc with commits 081f7cd and d8fb0bb

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 27, 2021
@dummdidumm
Copy link
Member

I'm not sure what is the issue here, as with latest Chrome/Firefox I see no red borders in the REPL. If I add <style> input:invalid { border: 1px solid red } </style> I see red borders in all browsers for all inputs. Closing for now, but feel free to provide a reproducible that describes the issue better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants