`self.view.window().run_command("hide_overlay")` immediately after `else` — works for me.