Skip to content
Snippets Groups Projects
Commit e03778ae authored by catch's avatar catch
Browse files

Issue #2666746 by droplet, Darren Oh: Fix simultaneous file uploads re-posting data

parent 1ba34330
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -181,12 +181,7 @@
* The event triggered, most likely a `mousedown` event.
*/
disableFields(event) {
const $clickedButton = $(this).findOnce('ajax');
// Only disable upload fields for Ajax buttons.
if (!$clickedButton.length) {
return;
}
const $clickedButton = $(this);
// Check if we're working with an "Upload" button.
let $enabledFields = [];
......
......@@ -95,11 +95,7 @@
$(event.target).closest('.js-form-managed-file').find('.js-form-submit').trigger('mousedown');
},
disableFields: function disableFields(event) {
var $clickedButton = $(this).findOnce('ajax');
if (!$clickedButton.length) {
return;
}
var $clickedButton = $(this);
var $enabledFields = [];
if ($clickedButton.closest('div.js-form-managed-file').length > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment