Skip to content

Commit adfa0ab

Browse files
committed
Fix a bug where there are less widgets than focus index
1 parent 895c8b7 commit adfa0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arcade/gui/experimental/focus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def _get_focused_widget(self) -> UIWidget | None:
200200
if len(self._focusable_widgets) == 0:
201201
return None
202202

203-
if len(self._focusable_widgets) < self._focused < 0:
203+
if len(self._focusable_widgets) <= self._focused < 0:
204204
warnings.warn("Focused widget is out of range")
205205
self._focused = 0
206206

0 commit comments

Comments
 (0)