Skip to content

Commit 17ac9e1

Browse files
fix: prevent text loss on special characters in TextInput and TextArea
- Removed .trim modifier from v-model in BaseInput.vue and BaseMobileInput.vue to prevent interference with IME composition. - Added manual synchronization of internalValue with native DOM value on blur in BaseInput and BaseMobileInput to ensure final characters are captured correctly. - Fixed reactivity in TextInput and TextArea by using computed properties for exposed refs and fixing incorrect template ref assignments. - Bumped version to 3.154.7. Co-authored-by: lucasn4s <17988272+lucasn4s@users.noreply.github.com>
1 parent 85f095c commit 17ac9e1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/components/BaseInput.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@ function handleFocus(event) {
526526
527527
function handleBlur(event) {
528528
isFocused.value = false;
529+
530+
if (htmlInputRef.value && htmlInputRef.value.value !== undefined) {
531+
internalValue.value = htmlInputRef.value.value;
532+
}
533+
529534
/**
530535
* Evento emitido quando o componente deixa de ser focado.
531536
* @event blur

src/components/BaseMobileInput.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,11 @@ function handleFocus(event) {
575575
576576
function handleBlur(event) {
577577
isFocused.value = false;
578+
579+
if (componentRef.value && componentRef.value.value !== undefined) {
580+
internalValue.value = componentRef.value.value;
581+
}
582+
578583
/**
579584
* Evento emitido quando o componente deixa de ser focado.
580585
* @event blur

0 commit comments

Comments
 (0)