0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-08 08:09:14 -05:00

Merge pull request #5097 from penpot/eva-fix-arrow-keys-tabs

🐛  Fix arrow key movement on tabs
This commit is contained in:
Aitor Moreno 2024-09-17 17:23:32 +02:00 committed by GitHub
commit ca257d1caf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 2 deletions

View file

@ -177,3 +177,15 @@ test("Bug 7489 - Workspace-palette items stay hidden when opening with keyboard-
),
).toBeVisible();
});
test("Bug 8784 - Use keyboard arrow to move inside a text input does not change tabs", async ({
page,
}) => {
const workspacePage = new WorkspacePage(page);
await workspacePage.setupEmptyFile();
await workspacePage.goToWorkspace();
await workspacePage.pageName.click();
await page.keyboard.press("ArrowLeft");
await expect(workspacePage.pageName).toHaveText("Page 1");
});

View file

@ -175,8 +175,7 @@
class (dm/str class " " (stl/css :tabs))
props (mf/spread-props props {:class class
:on-key-down on-key-down})]
props (mf/spread-props props {:class class})]
(mf/with-effect [tabs]
(mf/set-ref-val! tabs-ref tabs))
@ -188,6 +187,7 @@
:tabs tabs
:on-ref on-ref
:selected selected
:on-key-down on-key-down
:on-click on-click}]]
(let [active-tab (get-tab tabs selected)

View file

@ -101,7 +101,17 @@
}
.tab-panel {
--tab-panel-outline-color: none;
&:focus {
outline: none;
}
&:focus-visible {
--tab-panel-outline-color: var(--color-accent-primary);
}
display: grid;
width: 100%;
height: 100%;
outline: $b-1 solid var(--tab-panel-outline-color);
}