From e03778aeea4c88a1de9da468ccf1bc879cb7fa69 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Thu, 19 Apr 2018 23:04:21 +0100 Subject: [PATCH] Issue #2666746 by droplet, Darren Oh: Fix simultaneous file uploads re-posting data --- core/modules/file/file.es6.js | 7 +------ core/modules/file/file.js | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/core/modules/file/file.es6.js b/core/modules/file/file.es6.js index 428d5a48c70e..6923e9524985 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 e87180a16125..604ccb772f83 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) { -- GitLab