Made post modal dismiss when clicking outside of it