From 56947cc333f2292191b2371bc3b96433b9ea5cab Mon Sep 17 00:00:00 2001 From: Sairaj Chouhan Date: Thu, 14 Nov 2024 13:05:09 +0530 Subject: [PATCH 1/2] fix: pseudo editable element for multiple text fields --- src/visualBuilder/utils/handleIndividualFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/visualBuilder/utils/handleIndividualFields.ts b/src/visualBuilder/utils/handleIndividualFields.ts index b7195a8..2088bf0 100644 --- a/src/visualBuilder/utils/handleIndividualFields.ts +++ b/src/visualBuilder/utils/handleIndividualFields.ts @@ -139,7 +139,7 @@ export async function handleIndividualFields( } // * title, single single_line, single multi_line, single number - if (ALLOWED_INLINE_EDITABLE_FIELD.includes(fieldType)) { + if (ALLOWED_INLINE_EDITABLE_FIELD.includes(fieldType) && !fieldSchema.multiple) { let actualEditableField = editableElement as HTMLElement; VisualBuilder.VisualBuilderGlobalState.value.focusFieldValue = From 119294bc06a47be90084c4081548158a4ee396de Mon Sep 17 00:00:00 2001 From: Sairaj Chouhan Date: Thu, 14 Nov 2024 13:51:47 +0530 Subject: [PATCH 2/2] chore: improve condition for multiple parent check --- src/visualBuilder/utils/handleIndividualFields.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/visualBuilder/utils/handleIndividualFields.ts b/src/visualBuilder/utils/handleIndividualFields.ts index 2088bf0..0878053 100644 --- a/src/visualBuilder/utils/handleIndividualFields.ts +++ b/src/visualBuilder/utils/handleIndividualFields.ts @@ -139,7 +139,12 @@ export async function handleIndividualFields( } // * title, single single_line, single multi_line, single number - if (ALLOWED_INLINE_EDITABLE_FIELD.includes(fieldType) && !fieldSchema.multiple) { + if (ALLOWED_INLINE_EDITABLE_FIELD.includes(fieldType)) { + if(fieldSchema.multiple){ + const isFieldContainer = Number(fieldMetadata.instance.fieldPathWithIndex.split('.').at(-1)) + if(Number.isNaN(isFieldContainer)) return; + } + let actualEditableField = editableElement as HTMLElement; VisualBuilder.VisualBuilderGlobalState.value.focusFieldValue =