diff --git a/client/ui/qml/Controls2/PageType.qml b/client/ui/qml/Controls2/PageType.qml index 724d3b0d..edeb07fe 100644 --- a/client/ui/qml/Controls2/PageType.qml +++ b/client/ui/qml/Controls2/PageType.qml @@ -18,7 +18,7 @@ Item { // Set a timer to set focus after a short delay Timer { id: timer - interval: 500 // Milliseconds + interval: 200 // Milliseconds onTriggered: { FocusController.resetRootObject() FocusController.setFocusOnDefaultItem() diff --git a/client/ui/qml/Controls2/PopupType.qml b/client/ui/qml/Controls2/PopupType.qml index 61221567..5f635593 100644 --- a/client/ui/qml/Controls2/PopupType.qml +++ b/client/ui/qml/Controls2/PopupType.qml @@ -5,6 +5,7 @@ import QtQuick.Layouts import Style 1.0 import "TextTypes" +import "../Config" Popup { id: root @@ -28,7 +29,7 @@ Popup { } onOpened: { - FocusController.pushRootObject(root) + timer.start() } onClosed: { @@ -42,6 +43,17 @@ Popup { radius: 4 } + Timer { + id: timer + interval: 400 // Milliseconds + onTriggered: { + FocusController.pushRootObject(root) + FocusController.setFocusItem(closeButton) + } + repeat: false // Stop the timer after one trigger + running: !GC.isMobile() // Start the timer + } + contentItem: Item { implicitWidth: content.implicitWidth implicitHeight: content.implicitHeight