From 232fd72e5320d95973a0d5d1bc0c8cc363854a19 Mon Sep 17 00:00:00 2001 From: Leonardo Murillo Date: Tue, 1 Sep 2015 16:32:29 -0600 Subject: [PATCH] Revert "Address bar now closes when you click outside of it" --- interface/resources/qml/AddressBarDialog.qml | 12 ------------ interface/resources/qml/Root.qml | 10 ---------- 2 files changed, 22 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index e8b562105b..3852ea3819 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -151,17 +151,6 @@ DialogContainer { } } - // Connect to parent's signals (Root.qml) - onParentChanged: { - // Hide the address bar when the user clicks outside it - // Note: if the user clicks on another dialog this won't get called. - - if (parent && parent.unhandledClick) { - parent.unhandledClick.connect(function () { - root.enabled = false; - }); - } - } onVisibleChanged: { if (!visible) { addressLine.text = "" @@ -176,7 +165,6 @@ DialogContainer { } } - Keys.onPressed: { switch (event.key) { case Qt.Key_Escape: diff --git a/interface/resources/qml/Root.qml b/interface/resources/qml/Root.qml index 7e11ff0d74..1b0f09558f 100644 --- a/interface/resources/qml/Root.qml +++ b/interface/resources/qml/Root.qml @@ -6,16 +6,6 @@ import QtQuick 2.3 Root { id: root anchors.fill: parent - signal unhandledClick(); - - // Detects a mouseclick that is not handled by any child components. - // Used by AddressBarDialog.qml to close when user clicks outside of it. - MouseArea { - anchors.fill: parent - onClicked: { - unhandledClick(); - } - } onParentChanged: { forceActiveFocus();