From af4791d70c39b67b27a188c556a4c0a04dfb88dd Mon Sep 17 00:00:00 2001 From: "Lukas E." <47783030+lukas-heinrich@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:53:18 +0200 Subject: [PATCH] Bugfix: 42377 & 42369: UI/Fields: Fix undefined input in file inputs (#8250) * fix undefined input id by using parent's id * fix undefined input id by using parents component selector --------- Co-authored-by: Lukas Eichenauer --- components/ILIAS/UI/resources/js/Input/Field/file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/UI/resources/js/Input/Field/file.js b/components/ILIAS/UI/resources/js/Input/Field/file.js index 14df82848a91..555fd3a5cdca 100755 --- a/components/ILIAS/UI/resources/js/Input/Field/file.js +++ b/components/ILIAS/UI/resources/js/Input/Field/file.js @@ -34,7 +34,7 @@ il.UI.Input = il.UI.Input || {}; * @type {{}} */ const SELECTOR = { - file_input: '.ui-input-file', + file_input: '[data-il-ui-component="file-field-input"]', file_list: '.ui-input-file-input-list', file_list_entry: '.ui-input-file-input', file_entry_metadata: '.ui-input-file-metadata', @@ -613,7 +613,7 @@ il.UI.Input = il.UI.Input || {}; if (typeof file_inputs[Symbol.iterator] === 'function') { let to_process = 0; for (let i = 0; i < file_inputs.length; i++) { - let input_id = file_inputs[i].id; + let input_id = $(file_inputs[i]).attr('id'); let dropzone = dropzones[input_id]; processRemovals(input_id, event); to_process += dropzone.files.length;