@colijnit/corecomponents_v12 262.1.14 → 262.1.15
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.
|
@@ -7491,7 +7491,7 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
7491
7491
|
this.clearIconClick.emit(event);
|
|
7492
7492
|
}
|
|
7493
7493
|
handleKeyDownInput(event) {
|
|
7494
|
-
const key = event.key.toLowerCase();
|
|
7494
|
+
const key = event.key ? event.key.toLowerCase() : '';
|
|
7495
7495
|
if (this.type === 'date') {
|
|
7496
7496
|
if (key === 'w') {
|
|
7497
7497
|
event.preventDefault();
|
|
@@ -7524,7 +7524,7 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
7524
7524
|
}
|
|
7525
7525
|
if (this.digitsOnly && !this.isWeekInputMode) {
|
|
7526
7526
|
// the field is a text input (so a locale comma is allowed), so actively permit only numeric characters
|
|
7527
|
-
if (
|
|
7527
|
+
if (key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
7528
7528
|
const isDigit = /\d/.test(event.key);
|
|
7529
7529
|
const isSeparator = event.key === '.' || event.key === ',';
|
|
7530
7530
|
const isSign = !this.excludePlusMinus && (event.key === '-' || event.key === '+');
|
|
@@ -7538,7 +7538,7 @@ class InputTextComponent extends BaseInputComponent {
|
|
|
7538
7538
|
event.preventDefault();
|
|
7539
7539
|
return;
|
|
7540
7540
|
}
|
|
7541
|
-
if (
|
|
7541
|
+
if (key !== this._numberLocale.decimalSeparator) {
|
|
7542
7542
|
event.preventDefault();
|
|
7543
7543
|
if (this.input) {
|
|
7544
7544
|
this._numberLocale.insertDecimalSeparator(this.input);
|