File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 17
17
import React , { useEffect } from 'react'
18
18
import ReactDOM from 'react-dom'
19
19
import { ModalType } from '../Types'
20
+ import { POP_UP_MENU_MODAL_ID } from '@Shared/constants'
20
21
21
22
/**
22
23
* @deprecated Use VisibleModal instead
@@ -78,7 +79,7 @@ export const Modal = ({
78
79
innerRef . current = el
79
80
} }
80
81
id = "popup"
81
- className = { `${ rootClassName } popup ${ modal ? 'modal' : '' } ` }
82
+ className = { `${ rootClassName } ${ POP_UP_MENU_MODAL_ID } ${ modal ? 'modal' : '' } ` }
82
83
style = { { ...style } }
83
84
>
84
85
{ children }
Original file line number Diff line number Diff line change 16
16
17
17
import React , { SyntheticEvent } from 'react'
18
18
import ReactDOM from 'react-dom'
19
- import { preventBodyScroll } from '../../Shared'
19
+ import { POP_UP_MENU_MODAL_ID , preventBodyScroll } from '../../Shared'
20
20
import { stopPropagation } from '../Helper'
21
21
22
22
export class VisibleModal extends React . Component < {
@@ -67,6 +67,10 @@ export class VisibleModal extends React.Component<{
67
67
}
68
68
69
69
handleBodyClick = ( e : SyntheticEvent ) => {
70
+ const isPopupMenuPresent = document . getElementById ( POP_UP_MENU_MODAL_ID )
71
+ if ( isPopupMenuPresent ) {
72
+ return
73
+ }
70
74
e . stopPropagation ( )
71
75
72
76
this . props . close ?.( e )
Original file line number Diff line number Diff line change @@ -419,3 +419,5 @@ export enum ComponentSizeType {
419
419
medium = 'medium' ,
420
420
large = 'large' ,
421
421
}
422
+
423
+ export const POP_UP_MENU_MODAL_ID = 'popup'
You can’t perform that action at this time.
0 commit comments