diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index fab5a375c099cd28304b2e35f002860d44c4c670..401d4d8530575be5663288758877dd2895be4edc 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -165,13 +165,13 @@ Rectangle {
                     } else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_N) {
                         messageInput.text = room.input.nextText();
                     } else if (event.key == Qt.Key_At) {
-                        messageInput.openCompleter(cursorPosition, "user");
+                        messageInput.openCompleter(selectionStart, "user");
                         popup.open();
                     } else if (event.key == Qt.Key_Colon) {
-                        messageInput.openCompleter(cursorPosition, "emoji");
+                        messageInput.openCompleter(selectionStart, "emoji");
                         popup.open();
                     } else if (event.key == Qt.Key_NumberSign) {
-                        messageInput.openCompleter(cursorPosition, "roomAliases");
+                        messageInput.openCompleter(selectionStart, "roomAliases");
                         popup.open();
                     } else if (event.key == Qt.Key_Escape && popup.opened) {
                         completerTriggeredAt = -1;