diff --git a/web/src/lib/components/shared-components/settings/setting-buttons-row.svelte b/web/src/lib/components/shared-components/settings/setting-buttons-row.svelte index 8199db17b2..f479112dee 100644 --- a/web/src/lib/components/shared-components/settings/setting-buttons-row.svelte +++ b/web/src/lib/components/shared-components/settings/setting-buttons-row.svelte @@ -27,6 +27,6 @@
- +
diff --git a/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts b/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts index 7b59affdb3..642492dda5 100644 --- a/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts +++ b/web/src/lib/components/shared-components/settings/setting-input-field.spec.ts @@ -27,4 +27,25 @@ describe('SettingInputField component', () => { await user.click(document.body); expect(numberInput.value).toEqual('100'); }); + + it('allows emptying number inputs while editing', async () => { + const { getByRole } = render(SettingInputField, { + props: { + label: 'test-number-input', + inputType: SettingInputFieldType.NUMBER, + value: 5, + }, + }); + const user = userEvent.setup(); + + const numberInput = getByRole('spinbutton') as HTMLInputElement; + expect(numberInput.value).toEqual('5'); + + await user.click(numberInput); + await user.keyboard('{Backspace}'); + expect(numberInput.value).toEqual(''); + + await user.click(document.body); + expect(numberInput.value).toEqual('0'); + }); }); diff --git a/web/src/lib/components/shared-components/settings/setting-input-field.svelte b/web/src/lib/components/shared-components/settings/setting-input-field.svelte index a92482b178..d3da95ebe1 100644 --- a/web/src/lib/components/shared-components/settings/setting-input-field.svelte +++ b/web/src/lib/components/shared-components/settings/setting-input-field.svelte @@ -9,6 +9,7 @@