- Adds #709 Feature request: Disallow toggling the negative/positive sign with '+' and '-' keypress
- This adds a new option
negativePositiveSignBehavior
for the managing the '-' and '+' key behavior - Setting
negativePositiveSignBehavior
totrue
will allow the toggling, while setting it tofalse
will disable it; this means that when hitting the '-' key, the value will always be set to its negative value, and hitting the '+' key will always set the element to its positive value (given the minimum and maximum value allows this)
- This adds a new option
- Updates the existing end-to-end tests that relied on the toggle behavior
- Fixes the incorrect error message when setting an invalid
positiveSignCharacter
option - Attempts to fix the 'node: 18' error from Travis CI
- Fixes #763 Copyright banner in the minimized distribution file is undefined
- Removes unused wdio script from package.json
Changes:
- By default the
-
and+
key will not toggle the negative/positive state of an AutoNumeric element anymore. - The default behavior has changed in this version, where toggling between the positive and negative value with the '-' or '+' keys is not activated, instead
-
will try to set the value negative, and+
will try to make it positive (this can fail if the resulting value is out of bounds). - If you want to use the previous behavior, please set
negativePositiveSignBehavior: AutoNumeric.options.negativePositiveSignBehavior.toggle
in your options' configuration.