🐛 (transaction) try to fix focus on validating

This commit is contained in:
2020-08-25 22:33:10 +02:00
parent d6e07dcc01
commit 57c87fa40b

View File

@@ -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 ||