We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When "CAD $0.00" People usually click after the $ to INSERT numbers.
The default behavior is after entering 99 is:
990.00 which is wrong because it ADDS numbers when it should INSERT like: 0.99 Because it moved the cursor to the end.
Here's my quick fix angular 8, ionic 4
@ViewChild('inputField', {static: true}) inputField: ElementRef; ... onClickInput() { // tslint:disable-next-line:triple-equals if (this.value == 0) { // tslint:disable-next-line:triple-equals if (typeof this.inputField.nativeElement.selectionStart == 'number') { this.inputField.nativeElement.selectionStart = this.inputField.nativeElement.selectionEnd = this.inputField.nativeElement.value.length; // tslint:disable-next-line:triple-equals } else if (typeof this.inputField.nativeElement.createTextRange != 'undefined') { this.inputField.nativeElement.focus(); let range = this.inputField.nativeElement.createTextRange(); range.collapse(false); range.select(); } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When "CAD $0.00"
People usually click after the $ to INSERT numbers.
The default behavior is after entering 99 is:
990.00 which is wrong because it ADDS numbers when it should INSERT like:
0.99 Because it moved the cursor to the end.
Here's my quick fix
angular 8, ionic 4
The text was updated successfully, but these errors were encountered: