From e8bcf1175fb59cb8844570baca39b714aa4d90a4 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Thu, 19 May 2022 16:41:29 +0200 Subject: [PATCH] M #~: Minor fix onblur attribute function (#2065) --- .../client/components/Tabs/Common/AttributeCreateForm.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js b/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js index 00133b55c4..a1ff395c0a 100644 --- a/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js +++ b/src/fireedge/src/client/components/Tabs/Common/AttributeCreateForm.js @@ -56,7 +56,14 @@ const AttributeCreateForm = memo(({ handleAdd }) => { } } - const handleBlur = (evt) => handleSubmit(handleCreateAttribute)(evt) + const handleBlur = (evt) => { + const nextTarget = evt.relatedTarget?.name + + // If the next target isn't the name or value input, submit the form + if (![nameInputKey, valueInputKey].includes(nextTarget)) { + handleSubmit(handleCreateAttribute)(evt) + } + } return ( <>