diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index 180c4f0c9..1c9f8b724 100644 --- a/electrum/gui/qml/components/Pin.qml +++ b/electrum/gui/qml/components/Pin.qml @@ -23,7 +23,7 @@ ElDialog { focus: true - closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose + closePolicy: canCancel ? Popup.CloseOnPressOutside : Popup.NoAutoClose property bool canCancel: true diff --git a/electrum/gui/qml/components/controls/ElDialog.qml b/electrum/gui/qml/components/controls/ElDialog.qml index 1caa8e71d..71079d7aa 100644 --- a/electrum/gui/qml/components/controls/ElDialog.qml +++ b/electrum/gui/qml/components/controls/ElDialog.qml @@ -19,7 +19,7 @@ Dialog { } closePolicy: allowClose - ? Popup.CloseOnEscape | Popup.CloseOnPressOutside + ? Popup.CloseOnPressOutside : Popup.NoAutoClose onOpenedChanged: { diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index dbf6ec4b9..ab5a268a1 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -430,6 +430,14 @@ ApplicationWindow } } + Shortcut { + context: Qt.ApplicationShortcut + sequence: "Esc" + onActivated: { + close() + } + } + Connections { target: Daemon function onWalletRequiresPassword(name, path) {