Listoka / bittoka

4 stars 1 forks source link

Modal: When you click on open-space in the modal, it closes. Not ideal. #179

Closed kels0la closed 5 years ago

kels0la commented 5 years ago

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.

robbyphillips commented 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.

kels0la commented 5 years ago

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.