ngx-mask 20.0.1 → 20.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1516,7 +1516,7 @@ class NgxMaskService extends NgxMaskApplierService {
1516
1516
  const separatorPrecision = this.getPrecision(separatorExpression);
1517
1517
  let value = separatorValue;
1518
1518
  if (separatorExpression.indexOf('2') > 0 ||
1519
- (this.leadZero && Number(separatorPrecision) > 0)) {
1519
+ (this.leadZero && Number(separatorPrecision) > 0 && Number.isFinite(separatorPrecision))) {
1520
1520
  if (this.decimalMarker === MaskExpression.COMMA && this.leadZero) {
1521
1521
  value = value.replace(',', '.');
1522
1522
  }
@@ -2208,8 +2208,9 @@ class NgxMaskDirective {
2208
2208
  const el = e.target;
2209
2209
  this._inputValue.set(el.value);
2210
2210
  this._setMask();
2211
+ const isTextarea = el.tagName.toLowerCase() === 'textarea';
2211
2212
  if (el.type !== 'number') {
2212
- if (e.key === MaskExpression.ARROW_UP) {
2213
+ if (e.key === MaskExpression.ARROW_UP && !isTextarea) {
2213
2214
  e.preventDefault();
2214
2215
  }
2215
2216
  if (e.key === MaskExpression.ARROW_LEFT ||