Describe the bug
Number mask incorrectly displays -0 instead of 0 when max is set to 0 and user inputs zero.
To Reproduce
- Go to https://imask.js.org/guide.html#number
- In the options panel, set
Max to 0
- Type
0 in the input field
- Observe that it shows
-0 instead of 0
Expected behavior
When user inputs 0, it should display 0, not -0. Zero should not have a negative sign.
Screenshots/Demo
You can reproduce this on the official demo page by setting max=0.
Environment:
- OS: macOS 15 (исправил версию, macOS 26 не существует)
- Browser: Arc (Chromium Engine 140.0.7339.208)
- IMask version: 7.6.1
- Framework: React with react-imask plugin
Additional context
This issue occurs specifically when:
min is negative (e.g., -999)
max is 0
- User types
0
The typedValue is correct (returns 0), but the displayed value shows -0 which is confusing for users.
Describe the bug
Number mask incorrectly displays
-0instead of0whenmaxis set to 0 and user inputs zero.To Reproduce
Maxto00in the input field-0instead of0Expected behavior
When user inputs
0, it should display0, not-0. Zero should not have a negative sign.Screenshots/Demo
You can reproduce this on the official demo page by setting max=0.
Environment:
Additional context
This issue occurs specifically when:
minis negative (e.g., -999)maxis 00The typedValue is correct (returns 0), but the displayed value shows
-0which is confusing for users.