- last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - last update
over 1 year ago 2,110 pass - Status changed to Needs review
over 1 year ago 12:31pm 29 April 2023 - last update
over 1 year ago run-tests.sh exception - πΈπ°Slovakia poker10
We have discussed this with @mcdruid and @Fabianx on Slack and decided, that the best approach will be to include the double click protection in a new separate library, together with a possibility to OPT-OUT of this behavior.
I am uploading a new patch for D7. It is based on patch #130, with these changes (see interdiff):
1. There is a new variable
javascript_use_double_submit_protection
for possibility to opt-out from double click protection behavior entirely (it is better not to mix it withjavascript_always_use_jquery
settings, as that has a different purpose).2. Added a new library named
drupal.form-single-submit
(inmisc/form-single-submit.js
), where I have moved theDrupal.behaviors.formSingleSubmit
frommisc/form.js
.3. The tweak from #130 from
Drupal.behaviors.formSingleSubmit
is removed, so that we can commit the same code as it is in D10. We can add this later in follow-ups (D10 first).4. Updated the comment in
form_process_button
.5. Added a new test to verify the behavior of
form_process_button
and new variable (javascript_use_double_submit_protection
).We need to document this behavior and a new variable
javascript_use_double_submit_protection
in the change record.Unfortunatelly D7 does not have JS testing framework, so each feedback/manual testing will be appreaciated, so that we can move this forward :) Thanks!
- last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,146 pass - last update
over 1 year ago 2,111 pass - last update
over 1 year ago 2,150 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,111 pass - last update
over 1 year ago 2,150 pass - last update
over 1 year ago 2,150 pass - π¬π§United Kingdom mustanggb Coventry, United Kingdom
Correct me if I'm wrong, as I've not tested the patch.
But it doesn't look like the user is given any indication that this is happening.
I expected to see something along these lines:
$('.form-actions input', $form).attr('disabled', true);
- πΈπ°Slovakia poker10
Yes, that is true, there is no visual indication about the double click prevention.
The reason is that the situation in D10 is the same (no visual indication) and the javascript part of the D7 patch is practically 1:1 backport of the D10 code. We do not want to introduce additional changes which are not in D10 currently. If there are some ideas like this, or the one from #130, these could be handled in follow-up issues (D10 first).
- πΈπ°Slovakia poker10
Adding a tag for review from other maintainer, as I think this issue should be ready - it was RTBC, I have "just" extracted the code to the separate library and added a new variable to add possibility to opt-out.
- Status changed to RTBC
over 1 year ago 2:09pm 6 June 2023 - π¬π§United Kingdom mcdruid π¬π§πͺπΊ
The D7 maintainers discussed this in chat and Fabian approved it, so removing FM tag.
Looks like it still needs a CR though.
- last update
over 1 year ago 2,156 pass - last update
over 1 year ago run-tests.sh exception - πΈπ°Slovakia poker10
I have created a draft CR here: https://www.drupal.org/node/3365142 β
Uploading a patch with the addition of a new variable to the
default.settings.php
. Other than that there are only minor tweaks to the comments. - last update
over 1 year ago 2,154 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,119 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,158 pass - last update
over 1 year ago 2,119 pass -
mcdruid β
committed 353a22fc on 7.x
Issue #1705618 by sun, nod_, mgifford, hanoii, clemens.tolboom, poker10...
-
mcdruid β
committed 353a22fc on 7.x
- Status changed to Fixed
over 1 year ago 7:21pm 6 June 2023 - π¬π§United Kingdom mcdruid π¬π§πͺπΊ
Thank you everybody that contributed.
I'm afraid assigning credit is a bit of a best effort on an issue as long, old, and meandering as this one. Apologies if I've missed anything.
-
mcdruid β
committed e523ff5a on 7.x
Issue #1705618: new js file missing from previous commit
-
mcdruid β
committed e523ff5a on 7.x
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 4:21pm 21 July 2023 - π¬π§United Kingdom pjflopes
Is there any way to disable this feature just in specific pages?
I want to have the feature enable in the full site apart of a specific page.
thanks
- π¬π§United Kingdom mustanggb Coventry, United Kingdom
@pjflopes
This is not really the best place to ask.
But you can either disable it globally with
$conf['javascript_use_double_submit_protection'] = FALSE;
Or presumably on a per form basis with a
hook_form_alter()
and removingform_process_button
from the relevant submit button#process
arrays.