fix: manage libraries focus

This commit is contained in:
edde746
2026-01-31 20:11:48 +01:00
parent 9176003717
commit 3733f52bcf
@@ -1370,6 +1370,7 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
_movingIndex = _movingIndex! - 1;
_focusedIndex = _movingIndex!;
});
_ensureFocusedVisible();
return KeyEventResult.handled;
}
if (key.isDownKey && _movingIndex! < _tempLibraries.length - 1) {
@@ -1379,6 +1380,7 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
_movingIndex = _movingIndex! + 1;
_focusedIndex = _movingIndex!;
});
_ensureFocusedVisible();
return KeyEventResult.handled;
}
if (key.isSelectKey) {
@@ -1438,6 +1440,11 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
}
}
// Block d-pad keys at boundaries so focus doesn't escape the dialog
if (key.isDpadDirection) {
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}