From 386a1ff126a5c4d7c5a8aca29964717fffd0d4c1 Mon Sep 17 00:00:00 2001 From: someone-here Date: Tue, 21 Mar 2023 07:56:23 +0530 Subject: [PATCH 1/2] popover onhide fix --- .../report/ContextMenu/PopoverReportActionContextMenu.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index 0075df0cdd31..c511c47b2237 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -147,10 +147,9 @@ class PopoverReportActionContextMenu extends React.Component { this.instanceID = Math.random().toString(36).substr(2, 5); // Register the onHide callback only when Popover is shown to remove the race conditions when there are mutltiple popover open requests - this.onPopoverShow = () => { - onShow(); - this.onPopoverHide = onHide; - }; + this.onPopoverShow = onShow; + this.onPopoverHide = onHide; + this.getContextMenuMeasuredLocation().then(({x, y}) => { this.setState({ cursorRelativePosition: { From dcce56b2d503addfebe3af8a42df9c47ceada135 Mon Sep 17 00:00:00 2001 From: someone-here Date: Tue, 21 Mar 2023 20:26:52 +0530 Subject: [PATCH 2/2] Removed comment --- .../home/report/ContextMenu/PopoverReportActionContextMenu.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index c511c47b2237..a16a28d08c97 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -146,7 +146,6 @@ class PopoverReportActionContextMenu extends React.Component { // But it is possible that every new request registers new callbacks thus instanceID is used to corelate those callbacks this.instanceID = Math.random().toString(36).substr(2, 5); - // Register the onHide callback only when Popover is shown to remove the race conditions when there are mutltiple popover open requests this.onPopoverShow = onShow; this.onPopoverHide = onHide;