From 9c094f5d9087dd0e7c8bb33b381c8923eaeec218 Mon Sep 17 00:00:00 2001 From: Zemke Date: Fri, 21 Jan 2022 17:48:25 +0100 Subject: [PATCH] GH-278 Only non-printable keys --- cwt-angular/src/main/webapp/app/message/chat.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cwt-angular/src/main/webapp/app/message/chat.component.ts b/cwt-angular/src/main/webapp/app/message/chat.component.ts index 7c8d4b7a..bca394ad 100644 --- a/cwt-angular/src/main/webapp/app/message/chat.component.ts +++ b/cwt-angular/src/main/webapp/app/message/chat.component.ts @@ -141,7 +141,9 @@ export class ChatComponent implements OnInit, OnDestroy { public onKeyup(e) { const key = e.key === 'Unidentified' ? String.fromCharCode(e.which) : e.key; - if (!['ArrowDown', 'ArrowUp', 'Tab', 'Enter'].includes(key)) this.suggest(); + if (key.length > 1 && !['ArrowDown', 'ArrowUp', 'Tab', 'Enter'].includes(key)) { + this.suggest(); + } } private suggest() {