mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat(core): allow keyboard navigation in tags inline editor (#7378)
fix AF-966 - Allow using arrowup/down to navigate the tag list candidates; press enter to add the currently focused tag option; - Allow using arrowleft/right to navigate the inline tag list (selected) and use backspace to delete focused tag.
This commit is contained in:
@@ -45,6 +45,24 @@ test('allow create tag', async ({ page }) => {
|
||||
await expectTagsVisible(page, ['Test2']);
|
||||
});
|
||||
|
||||
test('allow using keyboard to navigate tags', async ({ page }) => {
|
||||
await openTagsEditor(page);
|
||||
await searchAndCreateTag(page, 'Test1');
|
||||
await searchAndCreateTag(page, 'Test2');
|
||||
|
||||
await page.keyboard.press('ArrowLeft');
|
||||
await page.keyboard.press('Backspace');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test1']);
|
||||
|
||||
await openTagsEditor(page);
|
||||
await page.keyboard.press('ArrowDown');
|
||||
await page.keyboard.press('ArrowDown');
|
||||
await page.keyboard.press('Enter');
|
||||
await closeTagsEditor(page);
|
||||
await expectTagsVisible(page, ['Test1', 'Test2']);
|
||||
});
|
||||
|
||||
test('allow create tag on journals page', async ({ page }) => {
|
||||
await openJournalsPage(page);
|
||||
await waitForEditorLoad(page);
|
||||
|
||||
Reference in New Issue
Block a user