diff --git a/frontend/src/Editor/Components/Button.jsx b/frontend/src/Editor/Components/Button.jsx index e1277988e9..5cfa93c6ff 100644 --- a/frontend/src/Editor/Components/Button.jsx +++ b/frontend/src/Editor/Components/Button.jsx @@ -40,8 +40,10 @@ export const Button = function Button(props) { borderColor: borderColor, }; - registerAction('click', async function () { - if(!disable) { + registerAction( + 'click', + async function () { + if (!disable) { fireEvent('onClick'); } }, diff --git a/frontend/src/Editor/Components/CalendarPopover.jsx b/frontend/src/Editor/Components/CalendarPopover.jsx index 1ea3986214..d0bc0d1a2d 100644 --- a/frontend/src/Editor/Components/CalendarPopover.jsx +++ b/frontend/src/Editor/Components/CalendarPopover.jsx @@ -22,7 +22,7 @@ export const CalendarEventPopover = function ({ const calendarElement = document.getElementById(calendarWidgetId); const handleClickOutside = (event) => { - if (parentRef.current && !parentRef.current.contains(event.target)) { + if (parentRef.current && !parentRef.current.contains(event.target) && !event.target.closest('.editor-sidebar')) { popoverClosed(); } };