From cf39e1f2592f7e0a08c32d319f084e21c8319da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 4 Mar 2024 21:51:26 +0100 Subject: [PATCH] Do not split up pasted input on structrual entity selectors. This caused a part of the string to get split/lost Fixes issue #538 --- .../elements/structural_entity_select_controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/controllers/elements/structural_entity_select_controller.js b/assets/controllers/elements/structural_entity_select_controller.js index f3c321ea..5280c339 100644 --- a/assets/controllers/elements/structural_entity_select_controller.js +++ b/assets/controllers/elements/structural_entity_select_controller.js @@ -44,6 +44,11 @@ export default class extends Controller { maxOptions: null, create: allowAdd ? this.createItem.bind(this) : false, + // This three options allow us to paste element names with commas: (see issue #538) + maxItems: 1, + delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$", + splitOn: null, + searchField: [ {field: "text", weight : 2}, {field: "parent", weight : 0.5},