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:
commit
ca257d1caf
3 changed files with 24 additions and 2 deletions
|
@ -177,3 +177,15 @@ test("Bug 7489 - Workspace-palette items stay hidden when opening with keyboard-
|
||||||
),
|
),
|
||||||
).toBeVisible();
|
).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");
|
||||||
|
});
|
||||||
|
|
|
@ -175,8 +175,7 @@
|
||||||
|
|
||||||
class (dm/str class " " (stl/css :tabs))
|
class (dm/str class " " (stl/css :tabs))
|
||||||
|
|
||||||
props (mf/spread-props props {:class class
|
props (mf/spread-props props {:class class})]
|
||||||
:on-key-down on-key-down})]
|
|
||||||
|
|
||||||
(mf/with-effect [tabs]
|
(mf/with-effect [tabs]
|
||||||
(mf/set-ref-val! tabs-ref tabs))
|
(mf/set-ref-val! tabs-ref tabs))
|
||||||
|
@ -188,6 +187,7 @@
|
||||||
:tabs tabs
|
:tabs tabs
|
||||||
:on-ref on-ref
|
:on-ref on-ref
|
||||||
:selected selected
|
:selected selected
|
||||||
|
:on-key-down on-key-down
|
||||||
:on-click on-click}]]
|
:on-click on-click}]]
|
||||||
|
|
||||||
(let [active-tab (get-tab tabs selected)
|
(let [active-tab (get-tab tabs selected)
|
||||||
|
|
|
@ -101,7 +101,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-panel {
|
.tab-panel {
|
||||||
|
--tab-panel-outline-color: none;
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
--tab-panel-outline-color: var(--color-accent-primary);
|
||||||
|
}
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
outline: $b-1 solid var(--tab-panel-outline-color);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue