summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2018-04-19 22:04:21 (GMT)
committerNathaniel Catchpole2018-04-19 22:04:21 (GMT)
commite03778aeea4c88a1de9da468ccf1bc879cb7fa69 (patch)
treeb2d13afd669c184a4c51e7f2828968846880649d
parent1ba343302fde441382c033b538f081a9ebc3709e (diff)
Issue #2666746 by droplet, Darren Oh: Fix simultaneous file uploads re-posting data
-rw-r--r--core/modules/file/file.es6.js7
-rw-r--r--core/modules/file/file.js6
2 files changed, 2 insertions, 11 deletions
diff --git a/core/modules/file/file.es6.js b/core/modules/file/file.es6.js
index 428d5a4..6923e95 100644
--- a/core/modules/file/file.es6.js
+++ b/core/modules/file/file.es6.js
@@ -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 = [];
diff --git a/core/modules/file/file.js b/core/modules/file/file.js
index e87180a..604ccb7 100644
--- a/core/modules/file/file.js
+++ b/core/modules/file/file.js
@@ -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) {