-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
AJAX framework handle redirect response side-effect #5555
Comments
LukeTowers
added a commit
to wintercms/winter
that referenced
this issue
Apr 9, 2021
…ct response via AJAX. Fixes: octobercms/october#5555 Tested by wintercms/wn-test-plugin@9fb25e2 Refs: - octobercms/october#5055 (original issue attempted to solve with previous code) - octobercms/october#2780 (original issue regarding the hash change redirect not closing the loading indicator) - octobercms/october@99a0861 (October's solution to the issue)
LukeTowers
pushed a commit
to wintercms/winter
that referenced
this issue
Apr 9, 2021
…ator (#70) Fix issue with premature hiding of loading indicators during a redirect response via AJAX. Fixes: octobercms/october#5555 Tested by wintercms/wn-test-plugin@9fb25e2 Refs: - octobercms/october#5055 (original issue attempted to solve with previous code) - octobercms/october#5321 (solution to octobercms/october#5055) - octobercms/october#2780 (original issue regarding the hash change redirect not closing the loading indicator) - octobercms/october@99a0861 (October's solution to the issue)
LukeTowers
pushed a commit
to wintercms/wn-system-module
that referenced
this issue
Apr 9, 2021
…ator (#70) Fix issue with premature hiding of loading indicators during a redirect response via AJAX. Fixes: octobercms/october#5555 Tested by wintercms/wn-test-plugin@9fb25e2 Refs: - octobercms/october#5055 (original issue attempted to solve with previous code) - octobercms/october#5321 (solution to octobercms/october#5055) - octobercms/october#2780 (original issue regarding the hash change redirect not closing the loading indicator) - octobercms/october@99a0861 (October's solution to the issue)
LukeTowers
added a commit
to wintercms/wn-system-module
that referenced
this issue
Apr 26, 2021
…ct response via AJAX. Fixes: octobercms/october#5555 Tested by wintercms/wn-test-plugin@9fb25e2 Refs: - octobercms/october#5055 (original issue attempted to solve with previous code) - octobercms/october#2780 (original issue regarding the hash change redirect not closing the loading indicator) - octobercms/october@99a0861 (October's solution to the issue)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
This is a follow up on this issue:
The addition of this specific code has nasty side-effects:
In quite a lot of our projects we have a following situation as such:
Now when the Place Order Now! is clicked, the button will be disabled (because of the
data-attach-loading
) while processing the request.When a redirect response has been detected, it will point the browser to the new URL and immediately after that it will trigger the
ajaxDone
and de disabled-state of all form elements (which havedata-attach-loading
) will be discarded.Which enables the user to press the button Place Order Now! again during the redirection process. Which results in a form which is submissed twice (or more).
For now, I have fixed this behavior in my projects using this code:
The user who reported the issue with the file download response could have done this:
The text was updated successfully, but these errors were encountered: