Skip to content
Snippets Groups Projects
Commit d1280af2 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Autoclose completer when space is pressed and no suggestion available

parent 498bfb89
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ Popup {
property string completerName
property var completer
property bool bottomToTop: true
property alias count: listView.count
signal completionClicked(string completion)
......
......@@ -162,6 +162,9 @@ Rectangle {
if (event.matches(StandardKey.Paste)) {
TimelineManager.timeline.input.paste(false);
event.accepted = true;
} else if (event.key == Qt.Key_Space) {
if (popup.opened && popup.count <= 0)
popup.close()
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_U) {
messageInput.clear();
} else if (event.modifiers == Qt.ControlModifier && event.key == Qt.Key_P) {
......
......@@ -35,7 +35,7 @@ Page {
colors: palette
model: EmojiProxyModel {
category: EmojiCategory.People
category: Emoji.Category.People
sourceModel: EmojiModel {
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment