From 43ba65303674d94a9d2a93c17922756c86127972 Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Sun, 12 Jan 2025 08:55:29 +0100
Subject: [PATCH] Update TextAreaInput after each input when using the iqb
 keyboard

---
 .../src/app/directives/text-input-group.directive.ts       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/projects/player/src/app/directives/text-input-group.directive.ts b/projects/player/src/app/directives/text-input-group.directive.ts
index 0bb8ec0d8..8d498d01c 100644
--- a/projects/player/src/app/directives/text-input-group.directive.ts
+++ b/projects/player/src/app/directives/text-input-group.directive.ts
@@ -276,11 +276,14 @@ export abstract class TextInputGroupDirective extends ElementFormGroupDirective
     return this.getInputElementValue().substring(endPosition);
   }
 
-  setSelection(start: number, end: number, backSpaceAtFirstPosition?: boolean): void {
+  private setSelection(start: number, end: number, backSpaceAtFirstPosition?: boolean): void {
     if (this.inputElement instanceof HTMLInputElement || this.inputElement instanceof HTMLTextAreaElement) {
       this.inputElement.setSelectionRange(start, end);
     } else if (!backSpaceAtFirstPosition) {
-      setTimeout(() => RangeSelectionService.setSelectionRange(this.inputElement, start, end));
+      setTimeout(() => {
+        RangeSelectionService.setSelectionRange(this.inputElement, start, end);
+        this.inputElement.dispatchEvent(new Event('input'));
+      });
     }
   }
 
-- 
GitLab