fix: manage libraries focus
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user