mirror of
https://github.com/iritmaximus/workh.git
synced 2026-10-12 19:13:33 +03:00
[QoL] Tab now moves to the next input field
This commit is contained in:
@@ -87,6 +87,14 @@ test.describe('entering total hours', () => {
|
||||
await expect(dayInput(page, MONDAY)).toHaveValue('6:45');
|
||||
void user;
|
||||
});
|
||||
|
||||
test('Tab moves straight to the next day, skipping the mode buttons', async ({ page, user }) => {
|
||||
await page.goto('/');
|
||||
await dayInput(page, MONDAY).focus();
|
||||
await page.keyboard.press('Tab');
|
||||
await expect(dayInput(page, TUE)).toBeFocused();
|
||||
void user;
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('start–end ranges', () => {
|
||||
|
||||
@@ -46,6 +46,8 @@ export function DayRow({ date, entry, worked, target, isToday, onChange }: Props
|
||||
<button
|
||||
key={m.mode}
|
||||
type="button"
|
||||
// Out of the tab order so Tab goes from one day's input straight to the next.
|
||||
tabIndex={-1}
|
||||
className={m.mode === mode ? 'active' : ''}
|
||||
onClick={() => m.mode !== mode && onChange(emptyEntry(m.mode))}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user