From 0c98146cb3f662cb83c44cb88cfbcf20c409f31f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 6 May 2015 00:32:12 +0200 Subject: Fix upload_form file inputs in firefox Selecting a file creates a new file input, but in firefox that new input will contains the same files as the one that was cloned so when the user hit upload the file will be uploaded twice. This does not affect chromium. Signed-off-by: Florian Pritz --- data/js/uploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') diff --git a/data/js/uploader.js b/data/js/uploader.js index 11ffc8d4a..0b3993eb0 100644 --- a/data/js/uploader.js +++ b/data/js/uploader.js @@ -50,7 +50,7 @@ define(['jquery', 'underscore'], function ($, _) { appendUploadInput: function (event) { if (_.any($(ui.uploadInputs), this.hasNoFiles)) { return; } - $(event.target).parent().append($(event.target).clone(), $('
')); + $(event.target).parent().append($(event.target).clone().val(""), $('
')); }, hasNoText: function (textArea) { -- cgit v1.2.3-24-g4f1b