@@ -42,6 +42,7 @@ FocusScope {
43 property bool superPressed: false
43 property bool superPressed: false
44 property bool superTabPressed: false
44 property bool superTabPressed: false
45+ property bool takesFocus: false;
46 readonly property bool dragging: dragArea.dragging
47 readonly property bool dragging: dragArea.dragging
47 readonly property real dragDistance: dragArea.dragging ? dragArea.touchPosition.x : 0
48 readonly property real dragDistance: dragArea.dragging ? dragArea.touchPosition.x : 0
@@ -65,6 +66,8 @@ FocusScope {
69+ onFocusChanged: {if (!focus) { root.takesFocus = false; }}
68 onSuperPressedChanged: {
71 onSuperPressedChanged: {
69 if (state == "drawer")
72 if (state == "drawer")
@@ -84,6 +87,7 @@ FocusScope {
84 if (superTabPressed) {
87 if (superTabPressed) {
85 switchToNextState("visible")
88 switchToNextState("visible")
86 panel.highlightIndex = -1;
89 panel.highlightIndex = -1;
90+ root.takesFocus = true;
87 root.focus = true;
91 root.focus = true;
88 superPressTimer.stop();
92 superPressTimer.stop();
89 superLongPressTimer.stop();
93 superLongPressTimer.stop();
@@ -128,6 +132,7 @@ FocusScope {
129 switchToNextState("")
133 switchToNextState("")
133 function fadeOut() {
138 function fadeOut() {
@@ -164,6 +169,7 @@ FocusScope {
164 function openForKeyboardNavigation() {
169 function openForKeyboardNavigation() {
165 panel.highlightIndex = -1; // The BFB
170 panel.highlightIndex = -1; // The BFB
166 drawer.focus = false;
171 drawer.focus = false;
172+ root.takesFocus = true;
167 root.focus = true;
173 root.focus = true;
168 switchToNextState("visible")
174 switchToNextState("visible")
@@ -176,6 +182,7 @@ FocusScope {
176 panel.shortcutHintsShown = false;
182 panel.shortcutHintsShown = false;
177 superPressTimer.stop();
183 superPressTimer.stop();
178 superLongPressTimer.stop();
184 superLongPressTimer.stop();
185+ root.takesFocus = true;
179 root.focus = true;
186 root.focus = true;
180 if (focusInputField) {
187 if (focusInputField) {
181 drawer.focusInput();
188 drawer.focusInput();
@@ -232,7 +239,6 @@ FocusScope {
232 root.hide();
239 root.hide();
233 panel.highlightIndex = -2
240 panel.highlightIndex = -2
234 event.accepted = true;
241 event.accepted = true;