-
Notifications
You must be signed in to change notification settings - Fork 869
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
Not working on Safari after form submit with page reload #71
Comments
After playing around a little more, I'm starting to think that Safari just submits the form so quickly that Ladda doesn't have time to load. If I put in a dummy URL, submit the form and then hit the back button I'll see a frozen spinner. If this is what's actually happening... is there a workaround for it? |
I don't have a Safari browser to test with, but I think you are probably right about it submitting the form before you have a chance to see the spinner. In my opinion (I'm not the original creator of Ladda) it's not a good idea to use the |
I also tried the following instead of
This is quite frustrating, actually, because I'd like to give the user some feedback on a regular form, and because Ladda is working perfectly in Chrome on all forms - AJAX or otherwise. |
I think the issue is that a regular form submission reloads the page, and there's no guarantee that JavaScript/CSS animations will run smoothly during the reload. Some browsers do it, and others don't. That's why I recommend only using Ladda with AJAX forms, where you can control when the spinner starts and stops. Honestly, I think we should consider deprecating the |
I'd like to have some kind of feedback when uploading images, videos, etc. that doesn't involve AJAX. Was hoping Ladda would be it. :( |
Doesn't the browser have some kind of built-in loading indicator when submitting a standard form? |
Yeah, but I don't think anybody who isn't technical really pays attention to that, do they? |
Totally agree with @timgavin. Please, do not remove ability to use Ladda on buttons which triggers page reloads. Let's figure out a way to Safari and find a solution. |
I think I found a solution. It's hacky and dirty right now, but I need some confirmation from a real Safari experience. Problem: Safari won't repaint anything during Solution is to force Safari to do redraw. There are several approached to do that:
What I've found is that we need to force @timgavin can you check https://terales.github.io/Ladda/test/bootstrap.html, please? |
@terales The form submits but Ladda does not show. There's a 404 error in the console; could a required object be missing? |
No, this error is for Twitter stuff.
I have no idea what could we try next. Maybe you can try intersept submit
event, start Ladda and submit form after 1 ms or so?
…On Fri, Dec 15, 2017, 1:51 AM tim gavin ***@***.***> wrote:
@terales <https://github.com/terales> The form submits but Ladda does not
show. There's a 404 error in the console; could a required object be
missing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#71 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1Of2sv6cUvmck0Y-b6Ke4MJBClL1azks5tAbSRgaJpZM4QXUu8>
.
|
@timgavin could you update issue title to "Not working on Safari after form submit with page reload", please? |
This issue still without a solution? |
Yes, the only solution is to do it by yourself:
|
In IPAD or iphone the web chat i have a submit button , but in safari the web browser in not working |
@salimbaig916 Yes, the only solution, for now, is to implement this behaviour by yourself:
|
I have fixed this issue plus backed this library with an feature that implements feedback after the progress reached 100%. |
Using Safari 11.0.1 / macOS High Sierra
I've been having issues with Ladda lately in Safari, so I created the following page to test, keeping it as simple as possible. Ladda does not work; no spinner...
I tried the following Javascript too with the same result: no spinner
The text was updated successfully, but these errors were encountered: