Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix moar issues.
James Coledb4ccc5c94de
diff --git a/changelog.md b/changelog.mdindex 11cf2551f8..e2d6a5789c 100644--- a/changelog.md+++ b/changelog.md@@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).### Changed- #12782+- #12783+- #12784## v6.7.2 - 2026-09-16diff --git a/resources/assets/v3/js/pages/transactions/create.js b/resources/assets/v3/js/pages/transactions/create.jsindex a1fd2498e9..0402518e18 100644--- a/resources/assets/v3/js/pages/transactions/create.js+++ b/resources/assets/v3/js/pages/transactions/create.js@@ -71,6 +71,7 @@ import Alpine from "alpinejs";import { keyUpFromSource } from "./shared/keyup-from-source.js";import { keyUpFromDestination } from "./shared/keyup-from-destination.js";import { keyUpFromDescription } from "./shared/keyup-from-description.js";+import focusFirstInput from "../../shared/focus-first-input.js";window.enableDates = false;@@ -297,6 +298,7 @@ let create = function () {this.formData.primaryCurrencies = data.primaryCurrencies;this.formData.foreignCurrencies = data.foreignCurrencies;this.autoStep();+ focusFirstInput();});loadBudgets(false).then((data) => {diff --git a/resources/assets/v3/js/pages/transactions/edit.js b/resources/assets/v3/js/pages/transactions/edit.jsindex 3bf8a21525..5f0feb8122 100644--- a/resources/assets/v3/js/pages/transactions/edit.js+++ b/resources/assets/v3/js/pages/transactions/edit.js@@ -77,6 +77,7 @@ import { addTabListener } from "./shared/add-tab-listener.js";import { autoStep } from "./shared/auto-step.js";import { respondToTabSwitch } from "./shared/respond-to-tab-switch.js";import Alpine from "alpinejs";+import focusFirstInput from "../../shared/focus-first-input.js";const urls = getUrls();window.enableDates = false;@@ -302,6 +303,7 @@ let transactions = function () {this.notifications.wait.show = false;}).then(() => {+ focusFirstInput();this.groupProperties.totalAmount = 0;for (let i in this.entries) {if (Object.hasOwn(this.entries, i)) {diff --git a/resources/assets/v3/js/shared/focus-first-input.js b/resources/assets/v3/js/shared/focus-first-input.jsnew file mode 100644index 0000000000..9b0211441c--- /dev/null+++ b/resources/assets/v3/js/shared/focus-first-input.js@@ -0,0 +1,33 @@+/*+ * focus-first-input.js+ * Copyright (c) 2026 [email protected]+ *+ * This file is part of Firefly III (https://github.com/firefly-iii).+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ */++export default function focusFirstInput() {+ let list = document.querySelectorAll(+ 'div.app-content form input[type="text"]:enabled',+ );+ if (list.length > 0) {+ list[0].focus();+ return;+ }+ list = document.querySelectorAll('div.app-content input[type="text"]:enabled');+ if (list.length > 0) {+ list[0].focus();+ }+}