diff --git a/CHANGELOG.md b/CHANGELOG.md index f300262eba..86899c5390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Rename `CollapsibleTitle.action_toggle` to `action_toggle_collapsible` to fix clash with `DOMNode.action_toggle` https://github.com/Textualize/textual/pull/4221 - Markdown component classes weren't refreshed when watching for CSS https://github.com/Textualize/textual/issues/3464 - Rename `Switch.action_toggle` to `action_toggle_switch` to fix clash with `DOMNode.action_toggle` https://github.com/Textualize/textual/issues/4262 +- Fixed `OptionList.OptionHighlighted` leaking out of `Select` https://github.com/Textualize/textual/issues/4224 ### Changed diff --git a/src/textual/widgets/_select.py b/src/textual/widgets/_select.py index 0d19d4aaef..240cffe9ef 100644 --- a/src/textual/widgets/_select.py +++ b/src/textual/widgets/_select.py @@ -95,6 +95,12 @@ def on_option_list_option_selected(self, event: OptionList.OptionSelected) -> No event.stop() self.post_message(self.UpdateSelection(event.option_index)) + def on_option_list_option_highlighted( + self, event: OptionList.OptionHighlighted + ) -> None: + """Stop option list highlighted messages leaking.""" + event.stop() + class SelectCurrent(Horizontal): """Displays the currently selected option."""