remove overlay to allow clicking outside of modal

This commit is contained in:
plebeius.eth
2023-06-24 09:19:32 +02:00
parent 1c214ebf5c
commit 0f4d0fa434
+7 -3
View File
@@ -212,10 +212,13 @@ const ReplyModal = ({ isOpen, closeModal }) => {
onAfterOpen={onModalOpen}
onRequestClose={closeModal}
contentLabel="Reply Modal"
shouldCloseOnEsc={false}
shouldCloseOnEsc={true}
shouldCloseOnOverlayClick={isMobile}
selectedStyle={selectedStyle}
style={isMobile ? ({ overlay: { backgroundColor: "rgba(0,0,0,.25)" }}) : ({ overlay: { backgroundColor: "rgba(0,0,0,0)" }})}>
overlayClassName="overlay"
style={isMobile ? ({ overlay: { backgroundColor: "rgba(0,0,0,.25)" }}) : ({ overlay: { backgroundColor: "rgba(0,0,0,0)" }})
}
>
<Draggable handle=".modal-header" nodeRef={nodeRef} disabled={isMobile}>
<div className="modal-content" ref={nodeRef}>
<div className="modal-header">
@@ -240,7 +243,8 @@ const ReplyModal = ({ isOpen, closeModal }) => {
placeholder="Comment"
defaultValue={selectedText}
wrap="soft"
ref={commentRef} />
ref={commentRef}
/>
</div>
<div>
<button id="next" onClick={handleSubmit}>Post</button>