Skip to content

Commit

Permalink
Ensure we prevent messages that were prevented when call_next was ori…
Browse files Browse the repository at this point in the history
…ginally called (Textualize#4078)
  • Loading branch information
darrenburns authored Jan 30, 2024
1 parent 37ff2a4 commit 81808d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/textual/message_pump.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,8 @@ async def _flush_next_callbacks(self) -> None:
self._next_callbacks.clear()
for callback in callbacks:
try:
await self._dispatch_message(callback)
with self.prevent(*callback._prevent):
await invoke(callback.callback)
except Exception as error:
self.app._handle_exception(error)
break
Expand Down

0 comments on commit 81808d9

Please sign in to comment.