Closed kels0la closed 5 years ago
Just to clarify.. the 'overlay' div is the shaded background that covers the screen 'behind' the modal form. If we don't want clicking on the shaded area to close the modal, we can remove the onClick
from the overlay div. Otherwise we could implement that shouldCloseOnOverlayClick
prop and make the the the onClick look like onClick={shouldCloseonOverlayClick ? props.closeModal : null}
or something like that.
Ahh okay. Well, I don't have any issues with the overlay then. Just clicking outside of an input field within the modal causing it to close.
When you click within what I believe is called the "overlay" of the modal, it closes. I tried using a shouldCloseOnOverlayClick={false} to modify this, but it didn't work. It's pretty annoying if you start typing stuff in and you click within the modal and it closes. That's a poor user experience and I'm not sure how to fix it.