diff --git a/xCore.UI/src/app/setup/create/confirm-mnemonic/confirm-mnemonic.component.html b/xCore.UI/src/app/setup/create/confirm-mnemonic/confirm-mnemonic.component.html index ae02c4b..60e7b34 100644 --- a/xCore.UI/src/app/setup/create/confirm-mnemonic/confirm-mnemonic.component.html +++ b/xCore.UI/src/app/setup/create/confirm-mnemonic/confirm-mnemonic.component.html @@ -1,5 +1,5 @@
-
+
@@ -20,7 +20,7 @@
{{ matchError }}
diff --git a/xCore.UI/src/app/wallet/receive/receive.component.ts b/xCore.UI/src/app/wallet/receive/receive.component.ts index 6fd0ea0..bd87f71 100644 --- a/xCore.UI/src/app/wallet/receive/receive.component.ts +++ b/xCore.UI/src/app/wallet/receive/receive.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { ElectronService } from 'ngx-electron'; import { ApiService } from '../../shared/services/api.service'; import { GlobalService } from '../../shared/services/global.service'; @@ -17,7 +17,7 @@ import { PriceLockUtil } from '../../shared/models/pricelockutil'; templateUrl: './receive.component.html', styleUrls: ['./receive.component.css'], }) -export class ReceiveComponent implements OnInit { +export class ReceiveComponent implements OnInit, AfterViewInit { constructor( private apiService: ApiService, private globalService: GlobalService, @@ -63,6 +63,8 @@ export class ReceiveComponent implements OnInit { public showAbout: boolean; public errorMessage: string; + @ViewChild('closeButton') focusElement: ElementRef; + ngOnInit() { this.getPairs(); this.getUnusedReceiveAddresses(); @@ -80,6 +82,14 @@ export class ReceiveComponent implements OnInit { this.priceLockForm.patchValue({ blockExpire: 45 }); } + ngAfterViewInit() { + setTimeout(() => { + if (this.focusElement) { + this.focusElement.nativeElement.focus(); + } + }, 0); + } + private buildCreatePLForm(): void { this.priceLockForm = this.fb.group({ pair: [],