mirror of https://gitee.com/answerdev/answer.git
fix(ImgViewer): Enables Modal to be closed even when `Modal.Body` is clicked
This commit is contained in:
parent
0566894a2c
commit
2cb0468605
|
@ -55,13 +55,11 @@ const useImgViewer = () => {
|
|||
scrollable
|
||||
contentClassName="bg-transparent"
|
||||
onHide={onClose}>
|
||||
<Modal.Body>
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */}
|
||||
<Modal.Body onClick={onClose}>
|
||||
<img
|
||||
className="cursor-zoom-out img-fluid position-absolute top-50 start-50 translate-middle"
|
||||
src={imgSrc}
|
||||
alt={imgSrc}
|
||||
onClick={onClose}
|
||||
/>
|
||||
</Modal.Body>
|
||||
</Modal>,
|
||||
|
|
Loading…
Reference in New Issue