made post modal dismiss when clicking outside