Fixes bug where clicking and dragging off of modal window will close modal window