Dropdown in modal is stuck even when modal is closed

I have a modal that has multiple things in it including dropdown. When I open modal and dropdown and click inside modal the dropdown and modal close properly. I also have cancel button and when I open dropdown and press cancel the modal and dropdown close properly. When I open modal and dropdown and click outside of modal, the modal closes but dropdown is stuck like this
enter image description here

My code for cancel button is

this.cancel = () => {
$uibModalInstance.dismiss('cancel'); };

How can I listen to outside click and call this method on event?