--
Ticket URL: <https://code.djangoproject.com/ticket/28889>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> For fast clickers.
New description:
For fast clickers.
--
Comment (by Manuel Saelices):
Fixed on this Pull Request: https://github.com/django/django/pull/9425
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:1>
* stage: Unreviewed => Accepted
Comment:
I think this is an improvement and the implementation looks reasonable.
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:2>
* has_patch: 0 => 1
* type: Bug => Cleanup/optimization
* needs_tests: 0 => 1
Comment:
I found an article titled [http://www.the-art-of-
web.com/javascript/doublesubmit/ JavaScript: Preventing Double Form
Submission] which might be worth reviewing. In particular, it points out
"Rather than simply disabling the button, we can also change the text so
that people don't get confused."
Did you consider trying to add some tests for the patch?
I share Nick's concern on the pull request that this may have a good
chance of causing some regression in unconsidered edge cases. I'm not sure
if it's considered a best practice these days. The article suggests that
some browsers (e.g. IE11) treat a double click as a single click. It
seems unfortunate if every project has to add something like this.
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:3>
* owner: nobody => Karan Bedi
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:4>
Comment (by Karan Bedi):
I have created a PR. Please guide me how to proceeding further.
[https://github.com/django/django/pull/9608 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:5>
Comment (by Carlton Gibson):
Hi Karan,
Thanks for the input. Your fix includes the changes Nick suggested from
the original PR. (Great.)
To get this merged we need to address Tim's concerns.
* Can we add some selenium tests, to exercise the behaviour?
* What's your assessment of the article Tim linked to? Do we need to do
this?
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:6>
Comment (by Karan Bedi):
Hi Carlton,
- I am unable to reproduce the behavior, probably because till now, I am
serving on localhost.
- In the article, there are different methods of implementing the same.
One improvement can be changing the label of the submit button after a
click.
- From the point of usability, there is just a comment by someone, which
also doesn't seem concrete.
Please guide me on how to proceed further.
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:7>
* owner: Karan Bedi => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:8>
* owner: (none) => Marcelo Galigniana
* status: new => assigned
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:9>
* has_patch: 0 => 1
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:10>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:11>
Comment (by Marcelo Galigniana):
For this issue there are currently 2 approaches:
- [https://github.com/django/django/pull/15217 Trigger an alert when
submitting twice]
- [https://github.com/django/django/pull/15229 Disable buttons while
submitting]
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:12>
Comment (by Marcelo Galigniana):
Is there anything I can do to move this forward?
Should I create a conversation at the django-developers google group?
IMO the 2nd approach: "Disable buttons while submitting" it's simpler and
works well!
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:13>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:14>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"fe7dbef5867c577995f0fc849d8dfdb8f2e6bbfa" fe7dbef]:
{{{
#!CommitTicketReference repository=""
revision="fe7dbef5867c577995f0fc849d8dfdb8f2e6bbfa"
Fixed #28889 -- Prevented double submission of admin forms.
Added a JavaScript confirm() to catch double-submissions, when the
change form has already been submitted.
Thanks to Adam Johnson, Claude Paroz, Keryn Knight, and Thibaud Colas
for review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:15>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"0756c61f2ada56e4ae625589099c0141a77737eb" 0756c61f]:
{{{
#!CommitTicketReference repository=""
revision="0756c61f2ada56e4ae625589099c0141a77737eb"
Fixed #33893 -- Reverted "Fixed #28889 -- Prevented double submission of
admin forms."
Regression in fe7dbef5867c577995f0fc849d8dfdb8f2e6bbfa.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:16>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"82e9e19ebe6bc920f1cfffc42d86648644fd4a78" 82e9e19]:
{{{
#!CommitTicketReference repository=""
revision="82e9e19ebe6bc920f1cfffc42d86648644fd4a78"
[4.1.x] Fixed #33893 -- Reverted "Fixed #28889 -- Prevented double
submission of admin forms."
Regression in fe7dbef5867c577995f0fc849d8dfdb8f2e6bbfa.
Backport of 0756c61f2ada56e4ae625589099c0141a77737eb from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:17>
* has_patch: 1 => 0
* resolution: fixed => wontfix
* stage: Ready for checkin => Unreviewed
Comment:
Patch was reverted, it's probably not worth complexity.
--
Ticket URL: <https://code.djangoproject.com/ticket/28889#comment:18>