Skip to content

A local-first personal finance app

fix tab skipping to the cleared column after clicking a date (#9367)

Matt Fiddaman1d9ec2d1d410
diff --git a/packages/desktop-client/e2e/transactions.test.ts b/packages/desktop-client/e2e/transactions.test.ts
index 95b1e12892..a11529f109 100644
--- a/packages/desktop-client/e2e/transactions.test.ts
+++ b/packages/desktop-client/e2e/transactions.test.ts
@@ -205,6 +205,23 @@ test.describe('Transactions', () => {
await expect(page).toMatchThemeScreenshots();
});
+ test('tabs from a date picked with the mouse to the payee', async () => {
+ await accountPage.addNewTransactionButton.click();
+
+ await page
+ .getByTestId('date-select-tooltip')
+ .getByText('15', { exact: true })
+ .click();
+ await expect(
+ accountPage.newTransactionRow.getByTestId('date').locator('input'),
+ ).toBeFocused();
+
+ await page.keyboard.press('Tab');
+ await expect(
+ accountPage.newTransactionRow.getByTestId('payee').locator('input'),
+ ).toBeFocused();
+ });
+
test('creates a split test transaction', async () => {
await accountPage.createSplitTransaction([
{
diff --git a/packages/desktop-client/src/components/select/DateSelect.tsx b/packages/desktop-client/src/components/select/DateSelect.tsx
index b084764319..b24f1a8d95 100644
--- a/packages/desktop-client/src/components/select/DateSelect.tsx
+++ b/packages/desktop-client/src/components/select/DateSelect.tsx
@@ -490,6 +490,7 @@ function DateSelectDesktop({
e.relatedTarget instanceof Element &&
e.relatedTarget.closest('[data-date-picker]')
) {
+ e.stopPropagation();
innerRef.current?.focus();
return;
}
diff --git a/upcoming-release-notes/fix-tab-after-picking-date-with-mouse.md b/upcoming-release-notes/fix-tab-after-picking-date-with-mouse.md
new file mode 100644
index 0000000000..b4c8cf3db2
--- /dev/null
+++ b/upcoming-release-notes/fix-tab-after-picking-date-with-mouse.md
@@ -0,0 +1,6 @@
+---
+category: Bugfixes
+authors: [matt-fidd]
+---
+
+Fix Tab skipping to the cleared column after picking a transaction date with the mouse