diff --git a/electrum/gui/qml/components/controls/ElDialog.qml b/electrum/gui/qml/components/controls/ElDialog.qml index b90402c9e8ee..9873e8e8c77f 100644 --- a/electrum/gui/qml/components/controls/ElDialog.qml +++ b/electrum/gui/qml/components/controls/ElDialog.qml @@ -50,6 +50,15 @@ Dialog { ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose + TapHandler { // close keyboard when tapping on the empty background + parent: abstractdialog.background + onTapped: { + // Release input focus so tapping the same field opens the keyboard again. + abstractdialog.contentItem.forceActiveFocus(Qt.MouseFocusReason) + Qt.inputMethod.hide() + } + } + onOpenedChanged: { if (opened) { app.activeDialogs.push(abstractdialog) diff --git a/electrum/gui/qml/components/wizard/Wizard.qml b/electrum/gui/qml/components/wizard/Wizard.qml index 5605a148679e..009f87e899d1 100644 --- a/electrum/gui/qml/components/wizard/Wizard.qml +++ b/electrum/gui/qml/components/wizard/Wizard.qml @@ -102,8 +102,8 @@ ElDialog { return page } - ColumnLayout { - anchors.fill: parent + // make layout contentItem so ElDialog TapHandler can focus on it and the Keys hook stays active + contentItem: ColumnLayout { spacing: 0 // root Item in Wizard, capture back button here and delegate to main