fix: 🐛 Prevent modifying tabindexes inside cookie modal
This commit is contained in:
parent
c04eeb1124
commit
39d100e490
1 changed files with 4 additions and 2 deletions
|
|
@ -648,7 +648,8 @@ export default class CookieNotice {
|
|||
.filter(
|
||||
(el) =>
|
||||
!el.hasAttribute("disabled") &&
|
||||
!el.getAttribute("aria-hidden")
|
||||
!el.getAttribute("aria-hidden") &&
|
||||
!this.cookieContainer.contains(el)
|
||||
)
|
||||
.forEach((el) => {
|
||||
(el as HTMLElement).setAttribute("tabindex", "-1");
|
||||
|
|
@ -664,7 +665,8 @@ export default class CookieNotice {
|
|||
(el as HTMLElement).offsetWidth ||
|
||||
(el as HTMLElement).offsetHeight ||
|
||||
el.getClientRects().length
|
||||
)
|
||||
) &&
|
||||
!this.cookieContainer.contains(el)
|
||||
)
|
||||
.forEach((el) => {
|
||||
(el as HTMLElement).setAttribute("tabindex", "0");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue