diff --git a/clive/__private/ui/onboarding/dedicated_form_screens/finish_form_screen.py b/clive/__private/ui/onboarding/dedicated_form_screens/finish_form_screen.py index ea6ffb113..b6511b90f 100644 --- a/clive/__private/ui/onboarding/dedicated_form_screens/finish_form_screen.py +++ b/clive/__private/ui/onboarding/dedicated_form_screens/finish_form_screen.py @@ -48,7 +48,8 @@ async def previous_screen(self) -> None: @on(CliveButton.Pressed, "#finish-button") async def finish(self) -> None: - await self.action_finish() + # Has to be done in a separate task to avoid deadlock. More: https://github.com/Textualize/textual/issues/5008 + self.app.run_worker(self.action_finish()) async def action_finish(self) -> None: await self._owner.execute_post_actions()