diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index 1d5365d7..5733dc37 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -415,8 +415,14 @@ ApplicationWindow { } + // NOTE: If using a Dialog, make sure closePolicy does not contain Dialog.CloseOnPressOutside + // or the virtual keyboard will close when pressing it... + + // https://bugreports.qt.io/browse/QTBUG-56918 KeyboardLoader { id: keyboardRect + parent: app.overlay + z: 1 anchors { left: parent.left; bottom: parent.bottom; right: parent.right } } } diff --git a/nymea-app/ui/components/MeaDialog.qml b/nymea-app/ui/components/MeaDialog.qml index 00c21b2d..a11016ec 100644 --- a/nymea-app/ui/components/MeaDialog.qml +++ b/nymea-app/ui/components/MeaDialog.qml @@ -14,6 +14,13 @@ Dialog { standardButtons: Dialog.Ok + MouseArea { + parent: app.overlay + anchors.fill: parent + z: -1 + onPressed: mouse.accepted = true + } + header: Item { implicitHeight: headerRow.height + app.margins * 2 implicitWidth: parent.width diff --git a/nymea-app/ui/devicepages/DevicePageBase.qml b/nymea-app/ui/devicepages/DevicePageBase.qml index 1c2d34ad..62e3990c 100644 --- a/nymea-app/ui/devicepages/DevicePageBase.qml +++ b/nymea-app/ui/devicepages/DevicePageBase.qml @@ -119,6 +119,9 @@ Page { MeaDialog { title: qsTr("Groups for %1").arg(root.device.name) headerIcon: "../images/view-grid-symbolic.svg" + // NOTE: If CloseOnPressOutside is active (default) it will break the QtVirtualKeyboard + // https://bugreports.qt.io/browse/QTBUG-56918 + closePolicy: Popup.CloseOnEscape RowLayout { Layout.leftMargin: app.margins diff --git a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml index 56167421..edd526c9 100644 --- a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml +++ b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml @@ -206,6 +206,9 @@ Page { y: app.margins standardButtons: Dialog.Ok | Dialog.Cancel + // NOTE: If CloseOnPressOutside is active (default) it will break the QtVirtualKeyboard + // https://bugreports.qt.io/browse/QTBUG-56918 + closePolicy: Popup.CloseOnEscape TextField { id: textField