Skip to content

Commit

Permalink
fix: additional check for isTrusted event
Browse files Browse the repository at this point in the history
See issue #227
  • Loading branch information
beholdr committed Aug 23, 2024
1 parent a0a91c1 commit acf44ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export class MaskInput {
}

private readonly onInput = (e: Event | InputEvent): void => {
if (e instanceof CustomEvent && e.type === 'input') {
// check both CustomEvent and isTrusted https://github.com/beholdr/maska/issues/227
if (e instanceof CustomEvent && e.type === 'input' && !e.isTrusted) {
return
}

Expand Down

0 comments on commit acf44ff

Please sign in to comment.