From 551c75c2cfcc8c1525076aaea18a596af6281c68 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Sun, 21 Aug 2022 22:07:18 +0100 Subject: [PATCH] set focus on amount (#916) --- lnbits/core/static/js/wallet.js | 4 ++++ lnbits/core/templates/core/wallet.html | 1 + 2 files changed, 5 insertions(+) diff --git a/lnbits/core/static/js/wallet.js b/lnbits/core/static/js/wallet.js index 15cab4b61..1c417eafc 100644 --- a/lnbits/core/static/js/wallet.js +++ b/lnbits/core/static/js/wallet.js @@ -232,6 +232,9 @@ new Vue({ generateChart(this.$refs.canvas, this.payments) }) }, + focusInput(el) { + this.$nextTick(() => this.$refs[el].focus()) + }, showReceiveDialog: function () { this.receive.show = true this.receive.status = 'pending' @@ -243,6 +246,7 @@ new Vue({ this.receive.paymentChecker = null this.receive.minMax = [0, 2100000000000000] this.receive.lnurl = null + this.focusInput('setAmount') }, showParseDialog: function () { this.parse.show = true diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index 78f33f3a0..bd2668d1a 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -428,6 +428,7 @@ :options="receive.units" >