From e7cc2c5a637a296bb0bf0633e8d4a5bf7c8c863d Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 23 Mar 2023 10:12:05 +0100 Subject: [PATCH] Revert "qml: pressing "Esc" on desktop to ~simulate "back" button" This reverts commit 7f7ee8d82f58a8b694085ed38565a611b270ae77. This commit caused a regression with the android back button not closing a dialog. reproduce: 1. from the main window, press receive. 2. in the request details window, press Create request. 3. in the receive payment dialog, press Copy 4. observe dialog cannot be closed by back button --- electrum/gui/qml/components/Pin.qml | 2 +- electrum/gui/qml/components/controls/ElDialog.qml | 2 +- electrum/gui/qml/components/main.qml | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index 1c9f8b724..180c4f0c9 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.CloseOnPressOutside : Popup.NoAutoClose + closePolicy: canCancel ? Popup.CloseOnEscape | 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 71079d7aa..1caa8e71d 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.CloseOnPressOutside + ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose onOpenedChanged: { diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index d97e3f1e2..a44cdbb13 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -439,14 +439,6 @@ ApplicationWindow } } - Shortcut { - context: Qt.ApplicationShortcut - sequence: "Esc" - onActivated: { - close() - } - } - Connections { target: Daemon function onWalletRequiresPassword(name, path) {