Skip to content

Commit

Permalink
Hide first focus on inputs as well
Browse files Browse the repository at this point in the history
* As it may also be a considered a visual bug by people
  • Loading branch information
zoglo committed Dec 13, 2024
1 parent 5517aa9 commit 759742b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Resources/public/scripts/cookiebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ let ContaoCookiebar = (function () {
if (state) {
document.addEventListener('keydown', focusTrap);
cookiebar.dom.querySelector('.cc-inner').onanimationend = () => {
cookiebar.focused = false
cookiebar.firstFocus?.classList.add('cc-hide-focus')
cookiebar.firstFocus?.focus()
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/scripts/cookiebar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Resources/public/styles/_cookiebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
}

&:focus-visible {
&:focus-visible:not(.cc-hide-focus) {

+ label {

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/styles/cookiebar_default.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 759742b

Please sign in to comment.