diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml index 86ef776b6d..ff01aa65da 100644 --- a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml +++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml @@ -24,6 +24,14 @@ Item { HifiConstants { id: hifi; } id: root; + + // This object is always used in a popup. + // This MouseArea is used to prevent a user from being + // able to click on a button/mouseArea underneath the popup. + MouseArea { + anchors.fill: parent; + propagateComposedEvents: false; + } Hifi.QmlCommerce { id: commerce; diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml index ffc1b3a175..862d1894db 100644 --- a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml +++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml @@ -27,6 +27,12 @@ Rectangle { // Style color: hifi.colors.baseGray; + onVisibleChanged: { + if (visible) { + root.resetSubmitButton(); + } + } + Connections { target: passphraseSelection; onSendMessageToLightbox: { @@ -150,7 +156,10 @@ Rectangle { width: 100; text: "Submit"; onClicked: { - passphraseSelection.validateAndSubmitPassphrase() + if (passphraseSelection.validateAndSubmitPassphrase()) { + passphraseSubmitButton.text = "Submitting..."; + passphraseSubmitButton.enabled = false; + } } } } diff --git a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml index e066102aec..ef81fd343a 100644 --- a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml +++ b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml @@ -74,6 +74,7 @@ Item { } MouseArea { anchors.fill: parent; + propagateComposedEvents: false; onClicked: { securityImageGrid.currentIndex = index; } diff --git a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml index cba697cbd8..d9adbbbe50 100644 --- a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml +++ b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml @@ -28,20 +28,24 @@ Rectangle { // Style color: hifi.colors.baseGray; + onVisibleChanged: { + if (visible) { + root.resetSubmitButton(); + } + } + Hifi.QmlCommerce { id: commerce; onSecurityImageResult: { if (imageID !== 0) { // Success submitting new security image if (root.justSubmitted) { - securityImageSubmitButton.enabled = true; - securityImageSubmitButton.text = "Submit"; + root.resetSubmitButton(); root.visible = false; } } else if (root.justSubmitted) { // Error submitting new security image. - securityImageSubmitButton.enabled = true - securityImageSubmitButton.text = "Submit"; + root.resetSubmitButton(); root.justSubmitted = false; } } @@ -186,4 +190,9 @@ Rectangle { // // SECURITY IMAGE SELECTION END // + + function resetSubmitButton() { + securityImageSubmitButton.enabled = true; + securityImageSubmitButton.text = "Submit"; + } }