🐛 (transaction) try to fix focus on validating
This commit is contained in:
@@ -432,6 +432,21 @@ export default class TransactionCreate extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private validate(): boolean {
|
private validate(): boolean {
|
||||||
|
const activeElement = document.activeElement
|
||||||
|
if (activeElement) {
|
||||||
|
const input = activeElement as HTMLInputElement
|
||||||
|
if (input.blur) {
|
||||||
|
input.blur()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const el = document.querySelector(':focus')
|
||||||
|
if (el) {
|
||||||
|
const input = el as HTMLInputElement
|
||||||
|
if (input.blur) {
|
||||||
|
input.blur()
|
||||||
|
}
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
!this.name ||
|
!this.name ||
|
||||||
!this.amount ||
|
!this.amount ||
|
||||||
|
|||||||
Reference in New Issue
Block a user