diff --git a/Mohem/src/app/authentication/sms-page/sms-page.page.ts b/Mohem/src/app/authentication/sms-page/sms-page.page.ts index 4db111ea..aa9bf3b6 100644 --- a/Mohem/src/app/authentication/sms-page/sms-page.page.ts +++ b/Mohem/src/app/authentication/sms-page/sms-page.page.ts @@ -595,68 +595,47 @@ export class SmsPageComponent implements OnInit { onChange() { - // tslint:disable-next-line: only-arrow-functions - const filtered = this.smc_code.filter(function (el) { - if (el) { - return el; - } - }); if (filtered.length === 4 && !this.isAutoRead) { - this.checkVerificationCode(); - } - } - goToNextInput(e) { - const key = e.which; - const t = e.target; - const sib = t.nextElementSibling; + goToNextInput(e) { + const key = e.which; + const t = e.target; + const sib = t.nextElementSibling; const sibPre = t.previousElementSibling; - - if (key === undefined && (this.platform.is('ios') && !this.platform.is('mobileweb'))) { - - + if (key === undefined && e.target.value.length==4 && (this.platform.is('ios') && !this.platform.is('mobileweb'))) { this.checkActivation(e.target.value, false); - - - } if (key !== 9 && (key < 48 || key > 57)) { - if (key === 8 || key === 46) { - return true; - } else { - e.preventDefault(); - return false; - } - } if (key === 9) { return true; } + if (sib) { if (e.target.value === '') { sibPre.setFocus(); @@ -665,4 +644,6 @@ export class SmsPageComponent implements OnInit { } } } + + } diff --git a/Mohem/src/assets/icon/update.png b/Mohem/src/assets/icon/update.png deleted file mode 100644 index e461c733..00000000 Binary files a/Mohem/src/assets/icon/update.png and /dev/null differ