From 9e6cf73b4e96250e1bf241edf52bb0c8063544cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Thu, 9 Mar 2023 17:46:29 +0000 Subject: [PATCH] Add magic comment. Related comment: https://github.com/Textualize/textual/pull/2003\#discussion_r1131081129 Related PR: #2003. --- src/textual/driver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/textual/driver.py b/src/textual/driver.py index 0e8ac6412c..3aee951efe 100644 --- a/src/textual/driver.py +++ b/src/textual/driver.py @@ -55,6 +55,7 @@ def process_event(self, event: events.Event) -> None: and not event.button and self._last_move_event is not None ): + # Deduplicate self._down_buttons while preserving order. buttons = list(dict.fromkeys(self._down_buttons).keys()) self._down_buttons.clear() move_event = self._last_move_event