From f4193a1e32036891f2e93b40cf5cbace30ea2dfb Mon Sep 17 00:00:00 2001 From: Kiran Ashok Date: Tue, 11 Jun 2024 11:01:14 +0530 Subject: [PATCH] fix : Modal component not firing event (#10016) * fix : modal not firing event * fix : modal fireevent * chore : version bump --- .version | 2 +- frontend/.version | 2 +- frontend/src/Editor/Components/Modal.jsx | 3 ++- server/.version | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.version b/.version index 6679a60439..fb82db5291 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.61.1 +2.61.2 diff --git a/frontend/.version b/frontend/.version index 6679a60439..fb82db5291 100644 --- a/frontend/.version +++ b/frontend/.version @@ -1 +1 @@ -2.61.1 +2.61.2 diff --git a/frontend/src/Editor/Components/Modal.jsx b/frontend/src/Editor/Components/Modal.jsx index 3c33021889..e9bddfab21 100644 --- a/frontend/src/Editor/Components/Modal.jsx +++ b/frontend/src/Editor/Components/Modal.jsx @@ -87,7 +87,7 @@ export const Modal = function Modal({ return; } const canShowModal = exposedVariables.show ?? false; - fireEvent(canShowModal ? 'onOpen' : 'onClose'); + fireEvent(!canShowModal && 'onClose'); setShowModal(exposedVariables.show ?? false); const inputRef = document?.getElementsByClassName('tj-text-input-widget')?.[0]; inputRef?.blur(); @@ -223,6 +223,7 @@ export const Modal = function Modal({ event.stopPropagation(); setShowModal(true); setExposedVariable('show', true); + fireEvent('onOpen'); }} data-cy={`${dataCy}-launch-button`} > diff --git a/server/.version b/server/.version index 6679a60439..fb82db5291 100644 --- a/server/.version +++ b/server/.version @@ -1 +1 @@ -2.61.1 +2.61.2