From 699245ed34508e761757c9ce0a1906fd6ed7eec0 Mon Sep 17 00:00:00 2001 From: Eddy Harrington Date: Thu, 14 May 2020 17:08:25 -0700 Subject: [PATCH] added auto-focus to dashboard quick expense modal --- static/js/dashboard.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/dashboard.js b/static/js/dashboard.js index c616aca..9bcf4d5 100644 --- a/static/js/dashboard.js +++ b/static/js/dashboard.js @@ -24,6 +24,11 @@ function loadTrendsData(trendsData) { loadSpendingTrendsChart(spendingTrends); } +// After the modal is fully rendered, focus input into the new 'description' field +$('#quickExpenseModal').on('shown.bs.modal', function () { + $('#description').trigger('focus') +}) + function loadBudgetCharts(budgets) { if (budgets == null) { return;