Skip to content

Commit

Permalink
Merge pull request #7600 from surveyjs/bug/7596-dyn-panel-tab-focus
Browse files Browse the repository at this point in the history
Bug/7596 Dynamic panel has wrong focus for tabs
  • Loading branch information
andrewtelnov authored Dec 28, 2023
2 parents f095bce + dfb1b19 commit b9bcbf1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/defaultV2-theme/blocks/sd-paneldynamic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@
overflow-x: hidden;
white-space: nowrap;

&:hover {
&:hover,
&:focus-visible {
outline: none;
box-shadow: inset 0px -2px 0px $primary;
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions visualRegressionTests/tests/defaultV2/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,35 @@ frameworks.forEach(framework => {
await takeElementScreenshot("paneldynamic-confirm-dialog", Selector(".sv-popup--confirm-delete .sv-popup__body-content"), t, comparer);
});
});
test("tab focused state for panel dynamic", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1280, 900);
await initSurvey(framework, {
"pages": [
{
"name": "page1",
"elements": [
{
"type": "paneldynamic",
"name": "question1",
"templateElements": [
{
"type": "text",
"name": "question2"
}
],
"panelCount": 4,
"minPanelCount": 4,
"renderMode": "tab"
}
]
}
]
});
await t
.click(Selector("button[title='Panel 1']"))
.pressKey("tab");
await takeElementScreenshot("paneldynamic-focused-tab", Selector(".sd-question--paneldynamic"), t, comparer);
});
});
});

0 comments on commit b9bcbf1

Please sign in to comment.