Skip to content

Commit

Permalink
SK-1225 jquery bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
appasuamithsai committed Nov 10, 2023
1 parent a90c7d1 commit 852ddfb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/internal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,19 @@ export class FrameElement {
} else {
const target = event.target as HTMLInputElement;
const { mask } = this.iFrameFormElement;
const value = this.domInput?.value || this.iFrameFormElement.getValue();
if (mask) {
const translation = {};
Object.keys(mask[2]).forEach((key) => {
translation[key] = { pattern: mask[2][key] };
});
const output = getMaskedOutput(target.value, mask[0], translation);
this.iFrameFormElement.setValue(output, target.checkValidity());
if (output.length >= value.length) {
this.iFrameFormElement.setValue(output, target.checkValidity());
}
else {
target.value = output;
}
} else {
this.iFrameFormElement.setValue(target.value, target.checkValidity());
}
Expand Down

0 comments on commit 852ddfb

Please sign in to comment.