Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu authored and LeaderbotX400 committed Aug 29, 2024
1 parent 1710b80 commit a44b11d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/primevue/src/inputmask/InputMask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:placeholder="placeholder"
:fluid="hasFluid"
:unstyled="unstyled"
@input="onInput"
@compositionend="onInput"
@focus="onFocus"
@blur="onBlur"
Expand Down Expand Up @@ -53,10 +54,14 @@ export default {
},
methods: {
onInput(event) {
if (this.androidChrome) this.handleAndroidInput(event);
else this.handleInputChange(event);
// Check if the event is part of a text composition process (e.g., for Asian languages).
// If event.isComposing is true, it means the user is still composing text and the input is not finalized.
if (!event.isComposing) {
if (this.androidChrome) this.handleAndroidInput(event);
else this.handleInputChange(event);
this.$emit('update:modelValue', event.target.value);
this.$emit('update:modelValue', event.target.value);
}
},
onFocus(event) {
if (this.readonly) {
Expand Down

0 comments on commit a44b11d

Please sign in to comment.