Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not triggering events when using cutom maskRef in Svelte #999

Closed
angelvega93 opened this issue Feb 5, 2024 · 0 comments
Closed

Not triggering events when using cutom maskRef in Svelte #999

angelvega93 opened this issue Feb 5, 2024 · 0 comments

Comments

@angelvega93
Copy link

Describe the bug
Not triggering events when using custom maskRef.

To Reproduce
https://svelte.dev/repl/461c2cb07708415c8609d33730c05a5a?version=4.2.10

Expected behavior
It should trigger events.

Additional context
Replacing:

 if (opts instanceof IMask.InputMask) maskRef = opts;

With:

if (opts instanceof IMask.InputMask) {
  if (maskRef) maskRef.destroy();
  maskRef = initMask(el, opts);
}

Seems to fix the problem.

@angelvega93 angelvega93 changed the title Not triggering events when using cutom maskRef Not triggering events when using cutom maskRef in Svelte Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant