From 0380dca9f5d3be8108fce52ce73befc923e85a23 Mon Sep 17 00:00:00 2001 From: OlgaLarina Date: Wed, 8 Nov 2023 14:53:16 +0300 Subject: [PATCH] Other option in checkbox type question taking too much text input when using Handwriting (#7302) * work for #7252 Other option in checkbox type question taking too much text input when using Handwriting * work for #7252 fix angular build * work for #7252 fix angular build --------- Co-authored-by: OlgaLarina --- .../survey-angular-ui/src/comment-other.component.html | 1 + .../survey-angular-ui/src/comment-other.component.ts | 3 +++ packages/survey-angular-ui/src/comment.component.html | 1 + packages/survey-vue3-ui/src/QuestionComment.vue | 1 + packages/survey-vue3-ui/src/QuestionOther.vue | 1 + src/knockout/templates/comment.html | 4 ++-- src/question.ts | 9 +++++++++ src/question_baseselect.ts | 9 +++++++++ src/react/reactquestion_comment.tsx | 7 +++++++ src/vue/question-comment.vue | 1 + src/vue/question-other.vue | 1 + 11 files changed, 36 insertions(+), 2 deletions(-) diff --git a/packages/survey-angular-ui/src/comment-other.component.html b/packages/survey-angular-ui/src/comment-other.component.html index d51b57c735..73485a78a1 100644 --- a/packages/survey-angular-ui/src/comment-other.component.html +++ b/packages/survey-angular-ui/src/comment-other.component.html @@ -4,6 +4,7 @@ [disabled]="question.isInputReadOnly" (change)="onOtherValueChange($event)" (input)="onOtherValueInput($event)" + (compositionupdate)="onCompositionUpdateOtherValue($event)" [class]="question.cssClasses.other">
{{ otherValue }}
diff --git a/packages/survey-angular-ui/src/comment-other.component.ts b/packages/survey-angular-ui/src/comment-other.component.ts index e5ae01c51b..75fa277396 100644 --- a/packages/survey-angular-ui/src/comment-other.component.ts +++ b/packages/survey-angular-ui/src/comment-other.component.ts @@ -19,6 +19,9 @@ export class SurveyCommentOtherComponent { public onOtherValueInput(event: any): void { (this.question).onOtherValueInput(event); } + public onCompositionUpdateOtherValue(event: any): void { + (this.question).onCompositionUpdateOtherValue(event); + } public get otherId(): string { return (this.question).otherId; } diff --git a/packages/survey-angular-ui/src/comment.component.html b/packages/survey-angular-ui/src/comment.component.html index c3f4422d52..35bfccaeb0 100644 --- a/packages/survey-angular-ui/src/comment.component.html +++ b/packages/survey-angular-ui/src/comment.component.html @@ -4,6 +4,7 @@ [disabled]="question.isInputReadOnly" (change)="question.onCommentChange($event)" (input)="question.onCommentInput($event)" + (compositionupdate)="question.onCompositionUpdateComment($event)" [class]="question.cssClasses.other">
{{ question.comment }}
diff --git a/packages/survey-vue3-ui/src/QuestionComment.vue b/packages/survey-vue3-ui/src/QuestionComment.vue index 927e204b12..1fe21061be 100644 --- a/packages/survey-vue3-ui/src/QuestionComment.vue +++ b/packages/survey-vue3-ui/src/QuestionComment.vue @@ -24,6 +24,7 @@ question.onCommentInput(e); } " + @composition-update="(e) => { question.onCompositionUpdateComment(e); }" /> diff --git a/packages/survey-vue3-ui/src/QuestionOther.vue b/packages/survey-vue3-ui/src/QuestionOther.vue index 833555256d..8980bb8e40 100644 --- a/packages/survey-vue3-ui/src/QuestionOther.vue +++ b/packages/survey-vue3-ui/src/QuestionOther.vue @@ -22,6 +22,7 @@ question.onOtherValueInput(e); } " + @composition-update="(e) => { question.onCompositionUpdateOtherValue(e); }" />
{{ question.otherValue }}
diff --git a/src/knockout/templates/comment.html b/src/knockout/templates/comment.html index c7a5a84aa0..d5adb25d91 100644 --- a/src/knockout/templates/comment.html +++ b/src/knockout/templates/comment.html @@ -1,7 +1,7 @@