dismiss keyboard while editing

shouldDismissOnTapOutside: check if keyboard is on screen then dismiss keyboard else dismiss view