Recognizes gestures on modal dismiss