I have built an example that will guide you through the odd behavior of modals:
https://stackblitz.com/edit/ngx-bootstrap-qdilhe?file=app/app.module.ts
To make it simple, If you click inside the modal, but drag and release the mouse outside the modal, the modal is dismissed nevertheless. This behavior only happens on ngx-bootstrap, not on bootstrap's modal.
Any news on this one? It's proven very irritating for my clients who select areas of text inside a modal: releasing the click outside of it closes the modal.
I took the initiative to provide a fix in a PR. It divides the click event into its mouseup and mousedown event for better handling of the cases. The only drawback is that it creates an additional event listener but to my knowledge there is no other safe way to solve this bug.
Most helpful comment
I took the initiative to provide a fix in a PR. It divides the
clickevent into itsmouseupandmousedownevent for better handling of the cases. The only drawback is that it creates an additional event listener but to my knowledge there is no other safe way to solve this bug.