CModal of @coreui/react closing when clicking on the scrollbar

13 views Asked by At

I'm using coreui/react CModal to display an alert box. The problem that i have is that when i deminish the window size, i need to use the scrollbar to see all the content of the alert box, and when i click the scrollbar the alert box closes. How to avoid closing the alert box when clicking on the scrollbar?

Here is my code:

                <CModal
                alignment={"center"}
                visible={showSignUp}
                onClose={() => setShowSignUp(false)}
                className="custom-modal"
              >
                <CModalHeader onClose={() => setShowSignUp(false)}>
                  <CModalTitle
                    style={{ textAlign: "center", flex: 1 }}
                    id="LiveDemoExampleLabel"
                  >
                    Sign up
                  </CModalTitle>
                </CModalHeader>
                <CModalBody>
                  <>
                   CModalBody 
                  </>
                </CModalBody>
              </CModal>

I've tried to use an event when using the onClose, but the event returned is always undefined when clicking on the scrollbar.

0

There are 0 answers