diff --git a/src/peplum/app/widgets/pep_details.py b/src/peplum/app/widgets/pep_details.py index 5cb4f38..eca9028 100644 --- a/src/peplum/app/widgets/pep_details.py +++ b/src/peplum/app/widgets/pep_details.py @@ -10,8 +10,10 @@ ############################################################################## # Textual imports. +from textual import on from textual.app import ComposeResult from textual.containers import Vertical, VerticalScroll +from textual.events import DescendantBlur, DescendantFocus from textual.reactive import var from textual.widgets import Label, OptionList @@ -170,6 +172,13 @@ def compose(self) -> ComposeResult: with Field("URL"): yield URL(id="url") + @on(DescendantBlur) + @on(DescendantFocus) + def _textual_5488_workaround(self) -> None: + """Workaround for https://github.com/Textualize/textual/issues/5488""" + for widget in self.query(List): + widget._refresh_lines() + def watch_pep(self) -> None: """React to the PEP being changed.""" with self.app.batch_update():