diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2021-10-09 17:29:05 -0400 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2021-10-09 17:29:05 -0400 |
commit | 0841abead33978d098e146a6f33b2a9463ebc7ea (patch) | |
tree | 38122c1573259188fe62f38c5e158af45a7d5be6 | |
parent | Auto-focus the input (diff) | |
download | nheko-0841abead33978d098e146a6f33b2a9463ebc7ea.tar.xz |
Use better close-on-Enter logic
-rw-r--r-- | resources/qml/dialogs/JoinRoomDialog.qml | 12 |
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(); + } } } |