|
@@ -307,7 +307,7 @@ export class InputText extends Control implements IFocusableControl {
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
case 46: // DELETE
|
|
case 46: // DELETE
|
|
- if (this._text && this._text.length > 0) {
|
|
|
|
|
|
+ if (this._text && this._text.length > 0 && this._cursorOffset > 0) {
|
|
let deletePosition = this._text.length - this._cursorOffset;
|
|
let deletePosition = this._text.length - this._cursorOffset;
|
|
this.text = this._text.slice(0, deletePosition) + this._text.slice(deletePosition + 1);
|
|
this.text = this._text.slice(0, deletePosition) + this._text.slice(deletePosition + 1);
|
|
this._cursorOffset--;
|
|
this._cursorOffset--;
|
|
@@ -351,7 +351,7 @@ export class InputText extends Control implements IFocusableControl {
|
|
if (key &&
|
|
if (key &&
|
|
((keyCode === -1) || // Direct access
|
|
((keyCode === -1) || // Direct access
|
|
(keyCode === 32) || // Space
|
|
(keyCode === 32) || // Space
|
|
- (keyCode > 47 && keyCode < 58) || // Numbers
|
|
|
|
|
|
+ (keyCode > 47 && keyCode < 64) || // Numbers
|
|
(keyCode > 64 && keyCode < 91) || // Letters
|
|
(keyCode > 64 && keyCode < 91) || // Letters
|
|
(keyCode > 185 && keyCode < 193) || // Special characters
|
|
(keyCode > 185 && keyCode < 193) || // Special characters
|
|
(keyCode > 218 && keyCode < 223) || // Special characters
|
|
(keyCode > 218 && keyCode < 223) || // Special characters
|