Commit e03778ae authored by catch's avatar catch

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

parent 1ba34330
...@@ -181,12 +181,7 @@ ...@@ -181,12 +181,7 @@
* The event triggered, most likely a `mousedown` event. * The event triggered, most likely a `mousedown` event.
*/ */
disableFields(event) { disableFields(event) {
const $clickedButton = $(this).findOnce('ajax'); const $clickedButton = $(this);
// Only disable upload fields for Ajax buttons.
if (!$clickedButton.length) {
return;
}
// Check if we're working with an "Upload" button. // Check if we're working with an "Upload" button.
let $enabledFields = []; let $enabledFields = [];
......
...@@ -95,11 +95,7 @@ ...@@ -95,11 +95,7 @@
$(event.target).closest('.js-form-managed-file').find('.js-form-submit').trigger('mousedown'); $(event.target).closest('.js-form-managed-file').find('.js-form-submit').trigger('mousedown');
}, },
disableFields: function disableFields(event) { disableFields: function disableFields(event) {
var $clickedButton = $(this).findOnce('ajax'); var $clickedButton = $(this);
if (!$clickedButton.length) {
return;
}
var $enabledFields = []; var $enabledFields = [];
if ($clickedButton.closest('div.js-form-managed-file').length > 0) { if ($clickedButton.closest('div.js-form-managed-file').length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment