Fix:Show popover in calendar in editor mode when clicked outside the editor (#5483)

* Fix:Show popover in calnder in editor mode when clicked outside the editor

* Fix:Show popover in calnder in editor mode when clicked outside the editor, replace variable

* Fix:Show popover in calnder in editor mode when clicked outside the editor

* Fix:Show popover in calnder in editor mode when clicked outside the editor, replace variable

* Merge develop.

* Fix:Show popover in calnder in editor mode when clicked outside the editor, replace variable

* bug fixed

---------

Co-authored-by: manishkushare <kushare.manish9@gmail.com>
This commit is contained in:
EatPrayCode 2023-02-24 11:15:13 +05:30 committed by GitHub
parent 7f020ef296
commit de0830b776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -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');
}
},

View file

@ -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();
}
};