Skip to content

Commit

Permalink
Merge pull request #16341 from esh-g/popover-onhide-fix
Browse files Browse the repository at this point in the history
popover onhide fix
  • Loading branch information
luacmartins authored Mar 21, 2023
2 parents bf5322b + dcce56b commit ebc03db
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,9 @@ 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;
};
this.onPopoverShow = onShow;
this.onPopoverHide = onHide;

this.getContextMenuMeasuredLocation().then(({x, y}) => {
this.setState({
cursorRelativePosition: {
Expand Down

0 comments on commit ebc03db

Please sign in to comment.