noahsalvi / svelte-use-form

The most compact reactive form controller (including Validation) that you'll ever see.
MIT License
252 stars 14 forks source link

Browser compatibility? #27

Closed hauselin closed 2 years ago

hauselin commented 2 years ago

Hi, thanks for the great library! I've been using it and wonder if it's compatible with all browsers? It seems that occasionally form.valid remains false even when all inputs have been entered. I really appreciate any help anyone can provide. Thanks!

noahsalvi commented 2 years ago

Hey

Well normally it should work for all browsers but I can only confirm it for the ones I actually use (Chrome, Firefox and Safari). Are you also using one of those? And could you maybe share a repro to this problem so that I can look at it?

hauselin commented 2 years ago

I haven't been able to reproduce it myself, but dozens of users who visited my site have said the button remains disabled no matter what they do. I don't know what browsers they use, but if I can reproduce the bug myself, I'll definitely let you know. Thanks!

noahsalvi commented 2 years ago

That sounds kinda urgent 😬

If you want I can also take a look at your site, of course only for debugging purposes. You can use this email splice-saunas.0t@icloud.com, if you don't want to share the site publicly.

hauselin commented 2 years ago

You can check out it out here. Upon clicking next, I also called console.log($form) in case that helps a bit with debugging. My hunch is it's some combination of browser and system (maybe mobile?).

noahsalvi commented 2 years ago

It's probably Android since I can confirm that it works on MacOS and Windows for Safari, Chrome, Firefox and Edge and on iOS Safari and Chrome.

I'll try to test it with different devices when I get a chance 👍

hauselin commented 2 years ago

Perfect. Thanks! I've tested on a few Android devices and haven't been able to reproduce the issue either. Will update if I have more info.

hauselin commented 2 years ago

I've managed to retrieve the browser info from a few users. In fact, it's not Android. I think this one might be a tough one to debug/figure out, so don't worry if you don't have time to work on it. It could well be a problem with my site or the way these few people are completing the form/using the site (I've tested on ~1k people now and the overwhelming majority didn't run into any issues).

Update: I think it might be because I'm requiring numeric inputs and people might be entering non-numeric inputs. e.g., they enter 10 days instead of just 10; in such cases, inputs are provided but they're not considered valid. I've now added hints to remind people when that happens. I'll close the issue now and will re-open it if I run into problems again. Thanks for your help!

          browser      version        os resolution
1:    Chrome iPad 97.0.4692.84      iPad  1024x1366
2:  Chrome iPhone 92.0.4515.90    iPhone    414x896
3:  Chrome iPhone 97.0.4692.84    iPhone    428x926
4: Firefox iPhone         40.2    iPhone    414x896
5:         Safari         15.1 Macintosh  1024x1366
6:  Safari iPhone         15.1    iPhone    390x844
7:  Safari iPhone         15.2    iPhone    390x844
8:  Safari iPhone       15.2.1    iPhone    375x812
9:  Safari iPhone      Unknown    iPhone    390x844
noahsalvi commented 2 years ago

That sounds like it could be it!

Probably also cases like 10'000.