diff --git a/client/ui/qml/Components/QuestionDrawer.qml b/client/ui/qml/Components/QuestionDrawer.qml index 0dbd2eab..0a49358a 100644 --- a/client/ui/qml/Components/QuestionDrawer.qml +++ b/client/ui/qml/Components/QuestionDrawer.qml @@ -37,11 +37,11 @@ DrawerType2 { target: root enabled: !GC.isMobile() function onOpened() { - FocusController.setRootItem(root) + FocusController.pushRootObject(root) } function onClosed() { - FocusController.setRootItem(null) + FocusController.dropRootObject(root) } } diff --git a/client/ui/qml/Components/SelectLanguageDrawer.qml b/client/ui/qml/Components/SelectLanguageDrawer.qml index 337c5987..4ca472cf 100644 --- a/client/ui/qml/Components/SelectLanguageDrawer.qml +++ b/client/ui/qml/Components/SelectLanguageDrawer.qml @@ -24,11 +24,11 @@ DrawerType2 { target: root enabled: !GC.isMobile() function onOpened() { - FocusController.setRootItem(root) + FocusController.pushRootObject(root) } function onClosed() { - FocusController.setRootItem(null) + FocusController.dropRootObject(root) } } diff --git a/client/ui/qml/Controls2/DrawerType2.qml b/client/ui/qml/Controls2/DrawerType2.qml index 5e480327..04a7635c 100644 --- a/client/ui/qml/Controls2/DrawerType2.qml +++ b/client/ui/qml/Controls2/DrawerType2.qml @@ -95,7 +95,7 @@ Item { depthIndex = 0 PageController.decrementDrawerDepth() - FocusController.setRootItem(null) + FocusController.dropRootObject(root) } function onOpenTriggered() { @@ -118,7 +118,7 @@ Item { } depthIndex = PageController.incrementDrawerDepth() - FocusController.setRootItem(root) + FocusController.pushRootObject(root) } } diff --git a/client/ui/qml/Controls2/PageType.qml b/client/ui/qml/Controls2/PageType.qml index 977c18ba..724d3b0d 100644 --- a/client/ui/qml/Controls2/PageType.qml +++ b/client/ui/qml/Controls2/PageType.qml @@ -15,25 +15,13 @@ Item { } } -// MouseArea { -// id: globalMouseArea -// z: 99 -// anchors.fill: parent - -// enabled: true - -// onPressed: function(mouse) { -// forceActiveFocus() -// mouse.accepted = false -// } -// } - // Set a timer to set focus after a short delay Timer { id: timer interval: 500 // Milliseconds onTriggered: { - FocusController.resetFocus() + FocusController.resetRootObject() + FocusController.setFocusOnDefaultItem() } repeat: false // Stop the timer after one trigger running: !GC.isMobile() // Start the timer diff --git a/client/ui/qml/Controls2/PopupType.qml b/client/ui/qml/Controls2/PopupType.qml index 5bed7350..61221567 100644 --- a/client/ui/qml/Controls2/PopupType.qml +++ b/client/ui/qml/Controls2/PopupType.qml @@ -28,11 +28,11 @@ Popup { } onOpened: { - FocusController.setRootItem(root) + FocusController.pushRootObject(root) } onClosed: { - FocusController.setRootItem(null) + FocusController.dropRootObject(root) } background: Rectangle { diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index abd03809..01e623b6 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -299,7 +299,6 @@ PageType { tabBarStackView.goToTabBarPage(PageEnum.PageHome) ServersModel.processedIndex = ServersModel.defaultIndex tabBar.currentIndex = 0 - FocusController.setRootItem(null) // TODO: move to do it automaticaly } }