Don't accept space and enter key events in empty WindowHeaps

This fixes being able to select an empty desktop.

CCBUG: 457910
This commit is contained in:
David Edmundson 2022-09-27 06:26:38 +00:00 committed by Vlad Zahorodnii
parent e924b1cb23
commit 105af544c9

View file

@ -339,7 +339,7 @@ FocusScope {
break;
case Qt.Key_Return:
case Qt.Key_Space:
handled = true;
handled = false;
let selectedItem = null;
if (selectedIndex !== -1) {
selectedItem = windowsRepeater.itemAt(selectedIndex);