Skip to content

❓Question: emitEvent: false behavior when using ngx-mask directive #1569

@gloammer

Description

@gloammer

Description

I encountered an issue with the emitEvent: false behavior when using ngx-mask directive. When two FormControls depend on each other and mutually update values, the emitEvent: false option doesn't work as expected with masks applied.

Here's a minimal reproduction case: https://stackblitz.com/edit/angular-kzjbyusr?file=src%2Fmain.ts

Case 1 (without mask directive):
When using emitEvent: false, changing a value in controlX shows only one log controlY.setValue in the console, and vice versa - this is the expected behavior.

Case 2 (with mask directive):
When using emitEvent: false, changing a value in controlX shows two logs: controlX.setValue and controlY.setValue in the console, and vice versa. This means emitEvent: false is not working properly.

I expect the behavior to be consistent whether a mask is applied or not. The emitEvent: false option should prevent additional value change emissions regardless of mask usage.

Question: Is this emitEvent: false behavior with masks expected, or should it work the same way as without masks?

Environment

  • ngx-mask version: ^20.0.3
  • Angular version: ^20.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions