Skip to content

Commit 2f171ed

Browse files
committed
return True from on_press to stop dispatching
1 parent ee4b141 commit 2f171ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nurses/widgets/behaviors/selectable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ def on_press(self, key):
2828

2929
Selectable.__selected.parent.pull_to_front(Selectable.__selected)
3030
return True
31+
elif self.is_selected:
32+
return super().on_press(key)
3133

32-
return super().on_press(key)
34+
return True # Stop the dispatch because we aren't selected

0 commit comments

Comments
 (0)