sveltekit-superforms
sveltekit-superforms copied to clipboard
taintedMessage not work on mobil
- [X] Before posting an issue, read the FAQ and search the previous issues.
Description I have a problem with this superForm function option. It is set as true and works fine on Desktop, but in mobil devices (I have tried on Safari), is not working at all 😕
const form = superForm(data, {
validators: zodClient(schema),
taintedMessage: true
});
Does any one know why this is happening?
My guess is the reason being
- the feature depends on the beforeunload event
- the event seems to be unsupported on safari mobile
My guess is the reason being
- the feature depends on the beforeunload event
- the event seems to be unsupported on safari mobile
Wow! That makes sense to me! I’ll try on chrome browser to see if it works!
Thank you! 😃
I guess I misread, it looks like very old versions did not have it , I hope it is supported according to this https://caniuse.com/mdn-api_window_beforeunload_event But anyways I would test it on a real device using safari, maybe there are other reasons why it might not fire that event Or the issue lies elsewhere..
I would try to
- clarify whether the form is tainted before navigating
- clarify if the event is fired at all
- if it is, find out why nothing happens visually (maybe blocked)
- render your own UI if you get the event