summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-10-09 17:29:05 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-10-09 17:29:05 -0400
commit0841abead33978d098e146a6f33b2a9463ebc7ea (patch)
tree38122c1573259188fe62f38c5e158af45a7d5be6
parentAuto-focus the input (diff)
downloadnheko-0841abead33978d098e146a6f33b2a9463ebc7ea.tar.xz
Use better close-on-Enter logic
-rw-r--r--resources/qml/dialogs/JoinRoomDialog.qml12
1 files changed, 4 insertions, 8 deletions
diff --git a/resources/qml/dialogs/JoinRoomDialog.qml b/resources/qml/dialogs/JoinRoomDialog.qml
index 8f53bfcb..d3defa82 100644
--- a/resources/qml/dialogs/JoinRoomDialog.qml
+++ b/resources/qml/dialogs/JoinRoomDialog.qml
@@ -21,14 +21,6 @@ ApplicationWindow {
     height: fontMetrics.lineSpacing * 7
 
     Shortcut {
-        sequence: "Return"
-        onActivated: {
-            if (input.text.match("#.+?:.{3,}"))
-                dbb.accepted();
-        }
-    }
-
-    Shortcut {
         sequence: StandardKey.Cancel
         onActivated: dbb.rejected()
     }
@@ -50,6 +42,10 @@ ApplicationWindow {
 
             focus: true
             Layout.fillWidth: true
+            onAccepted: {
+                if (input.text.match("#.+?:.{3,}"))
+                    dbb.accepted();
+            }
         }
 
     }