diff --git a/src/app/settingsview/components/RevokeDevicePasswordDialog.qml b/src/app/settingsview/components/RevokeDevicePasswordDialog.qml
index 28f557b3eb0eb5b5b845159afa9434047788d6da..1731cfcd7a2f7438f6851ea6ecf2e3af8ae02eaf 100644
--- a/src/app/settingsview/components/RevokeDevicePasswordDialog.qml
+++ b/src/app/settingsview/components/RevokeDevicePasswordDialog.qml
@@ -36,13 +36,15 @@ BaseModalDialog {
     button1Role: DialogButtonBox.DestructiveRole
     button1.enabled: false
     button1.onClicked: {
-        DeviceItemListModel.revokeDevice(deviceId, passwordEdit.dynamicText);
+        DeviceItemListModel.revokeDevice(deviceId, pwd);
         close();
     }
     button2.text: JamiStrings.optionCancel
     button2Role: DialogButtonBox.RejectRole
     button2.onClicked: close()
 
+    property var pwd: ""
+
     popupContent: ColumnLayout {
         id: revokeDeviceContentColumnLayout
 
@@ -73,7 +75,10 @@ BaseModalDialog {
 
             placeholderText: JamiStrings.enterCurrentPassword
 
-            onDynamicTextChanged: root.button1.enabled = dynamicText.length > 0
+            onDynamicTextChanged: {
+                root.pwd = dynamicText
+                root.button1.enabled = dynamicText.length > 0
+            }
         }
     }
 }