@@ -42,6 +42,7 @@ FocusScope {
4242
4343 property bool superPressed: false
4444 property bool superTabPressed: false
45+ property bool takesFocus: false;
4546
4647 readonly property bool dragging: dragArea.dragging
4748 readonly property real dragDistance: dragArea.dragging ? dragArea.touchPosition.x : 0
@@ -65,6 +66,8 @@ FocusScope {
6566 }
6667 }
6768
69+ onFocusChanged: {if (!focus) { root.takesFocus = false; }}
70+
6871 onSuperPressedChanged: {
6972 if (state == "drawer")
7073 return;
@@ -84,6 +87,7 @@ FocusScope {
8487 if (superTabPressed) {
8588 switchToNextState("visible")
8689 panel.highlightIndex = -1;
90+ root.takesFocus = true;
8791 root.focus = true;
8892 superPressTimer.stop();
8993 superLongPressTimer.stop();
@@ -128,6 +132,7 @@ FocusScope {
128132 } else {
129133 switchToNextState("")
130134 }
135+ root.focus = false;
131136 }
132137
133138 function fadeOut() {
@@ -164,6 +169,7 @@ FocusScope {
164169 function openForKeyboardNavigation() {
165170 panel.highlightIndex = -1; // The BFB
166171 drawer.focus = false;
172+ root.takesFocus = true;
167173 root.focus = true;
168174 switchToNextState("visible")
169175 }
@@ -176,6 +182,7 @@ FocusScope {
176182 panel.shortcutHintsShown = false;
177183 superPressTimer.stop();
178184 superLongPressTimer.stop();
185+ root.takesFocus = true;
179186 root.focus = true;
180187 if (focusInputField) {
181188 drawer.focusInput();
@@ -232,7 +239,6 @@ FocusScope {
232239 root.hide();
233240 panel.highlightIndex = -2
234241 event.accepted = true;
235− root.focus = false;
236242 }
237243 }
238244