From 6d9311699336136eac3a0489398208b39a296c37 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 5 May 2024 18:18:07 +0300 Subject: [PATCH] fix checkbox add on missclick --- app/javascript/template_builder/builder.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index 1ea3ba491..96a931378 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -857,7 +857,7 @@ export default { type = this.fieldTypes[0] } - if (type === 'checkbox' && !this.drawFieldType) { + if (type === 'checkbox' && !this.drawFieldType && (this.template.fields[this.template.fields.length - 1]?.type === 'checkbox' || area.w)) { const previousField = [...this.template.fields].reverse().find((f) => f.type === type) const previousArea = previousField?.areas?.[previousField.areas.length - 1]