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 @@
* 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) {
......
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