2
0
mirror of https://github.com/tenrok/maska.git synced 2026-05-15 11:59:38 +03:00

fix: additional check for isTrusted event

See issue #227
This commit is contained in:
Alexander Shabunevich
2024-08-23 12:45:41 +03:00
parent a0a91c1dc9
commit acf44ff8ae
+2 -1
View File
@@ -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
}