File tree 2 files changed +5
-1
lines changed 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ function PopoverContextProvider(props) {
48
48
} , [ closePopover ] ) ;
49
49
50
50
React . useEffect ( ( ) => {
51
- const listener = ( ) => {
51
+ const listener = ( e ) => {
52
+ if ( ! activePopoverRef . current || ! activePopoverRef . current . ref || ! activePopoverRef . current . ref . current || activePopoverRef . current . ref . current . contains ( e . target ) ) {
53
+ return ;
54
+ }
52
55
closePopover ( ) ;
53
56
} ;
54
57
document . addEventListener ( 'contextmenu' , listener ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ function Popover(props) {
35
35
} else {
36
36
props . onModalHide ( ) ;
37
37
close ( props . anchorRef ) ;
38
+ Modal . onModalDidClose ( ) ;
38
39
}
39
40
Modal . willAlertModalBecomeVisible ( props . isVisible ) ;
40
41
Modal . setCloseModal ( props . isVisible ? ( ) => props . onClose ( props . anchorRef ) : null ) ;
You can’t perform that action at this time.
0 commit comments