Commit bbcec763 authored by ioedeveloper's avatar ioedeveloper Committed by yann300

Fixed modal blur handler.

parent dc57090e
...@@ -40,6 +40,13 @@ export const ModalDialog = (props: ModalDialogProps) => { ...@@ -40,6 +40,13 @@ export const ModalDialog = (props: ModalDialogProps) => {
handleHide() handleHide()
} }
const handleBlur = (e) => {
if (!e.currentTarget.contains(e.relatedTarget)) {
e.stopPropagation()
handleHide()
}
}
return ( return (
<div <div
data-id={`${props.id}ModalDialogContainer-react`} data-id={`${props.id}ModalDialogContainer-react`}
...@@ -51,10 +58,7 @@ export const ModalDialog = (props: ModalDialogProps) => { ...@@ -51,10 +58,7 @@ export const ModalDialog = (props: ModalDialogProps) => {
> >
<div className="modal-dialog" role="document"> <div className="modal-dialog" role="document">
<div <div
onBlur={(e) => { onBlur={handleBlur}
e.stopPropagation()
handleHide()
}}
ref={modal} ref={modal}
tabIndex={-1} tabIndex={-1}
className={'modal-content remixModalContent ' + (props.modalClass ? props.modalClass : '')} className={'modal-content remixModalContent ' + (props.modalClass ? props.modalClass : '')}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment