uNmAnNeR / imaskjs

vanilla javascript input mask

Home Page:https://imask.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept and Complete events are not fired in version 7

sebestenyb opened this issue · comments

Describe the bug
Upgraded the package from 6.* to 7.*, and the @accept and @complete events are not fired using directive.
We use Vite (with Laravel) to package and chunk the JS code.

To Reproduce

// app.ts
import {IMaskDirective} from 'vue-imask';

app.directive("mask", IMaskDirective as Directive);
// Component.vue
    <input
        v-model="numberModel"
        v-mask="Number"
        radix="."
        :unmask="true"
        @accept="onAccept"
        @complete="onComplete"
    />
// Component.vue
const numberModel = ref('');

const onAccept = (event: CustomEvent) => {
    console.log(event)
}
const onComplete = (event: CustomEvent) => {
    console.log(event)
}
// npm
npm list vue-imask
trips@ ~/Sites/trips
└── vue-imask@7.6.1

Expected behavior
We expect the events to be fired

We know it's not a lot of information, but we are in the dark here a bit, no errors, the mask works as it is supposed to work, masking the input, but the events are not fired. Any idea would be appreciated.

Environment:

  • OS: *
  • Browser: *
  • Version *
  • IMask version: 7.6.1 (checked for all 7.*)

Additional context
Add any other context about the problem here.