Skip to content

Commit

Permalink
#6320 Do not keep buttons focused after click (#6322)
Browse files Browse the repository at this point in the history
* #6320 Do not keep buttons focused after click
Fixes #6320

* #6320 Do not keep buttons focused after click
Fixes #6320

* #6320 - update screenshots
  • Loading branch information
novikov82 authored Dec 25, 2024
1 parent f663b96 commit 6063a5f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/survey-creator-core/src/components/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ svc-page {
}
//hovered and focused state
&:hover,
&:focus {
&:focus-visible {
background-color: var(--ctr-survey-page-toolbar-item-background-color-hovered, $background-dim);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/survey-creator-core/src/components/question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ svc-question {
}
//hovered and focused state
&:hover,
&:focus {
&:focus-visible {
background-color: var(--ctr-survey-question-panel-toolbar-item-background-color-hovered, $background-dim);
}

Expand Down Expand Up @@ -1328,7 +1328,7 @@ svc-question,
background-color: transparent;

&:hover,
&:focus {
&:focus-visible {
opacity: initial;
background-color: var(--ctr-survey-question-panel-toolbar-item-background-color-hovered, $background-dim);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions visualRegressionTests/tests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,9 @@ test("Check question button states", async (t) => {
await t.click(button);
await takeElementScreenshot("question-button-checked.png", button, t, comparer);
await t.click(button);
await t.hover(Selector(".svc-question__content"));
await takeElementScreenshot("question-button-after-click.png", button, t, comparer);
await t.pressKey("tab shift+tab");
await takeElementScreenshot("question-button-focused.png", button, t, comparer);
await ClientFunction(() => {
const question = window["creator"].survey.getQuestionByName("q1");
Expand Down

0 comments on commit 6063a5f

Please sign in to comment.