mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix sonarjs no-collapsible-if
This commit is contained in:
parent
ccdbf0bfc3
commit
1f4e65822b
33 changed files with 330 additions and 473 deletions
|
@ -384,10 +384,11 @@ import scrollManager from './scrollManager';
|
|||
// See if there's a focusable container, and if so, send the focus command to that
|
||||
if (activeElement) {
|
||||
const nearestElementFocusableParent = dom.parentWithClass(nearestElement, 'focusable');
|
||||
if (nearestElementFocusableParent && nearestElementFocusableParent !== nearestElement) {
|
||||
if (focusableContainer !== nearestElementFocusableParent) {
|
||||
nearestElement = nearestElementFocusableParent;
|
||||
}
|
||||
if (nearestElementFocusableParent
|
||||
&& nearestElementFocusableParent !== nearestElement
|
||||
&& focusableContainer !== nearestElementFocusableParent
|
||||
) {
|
||||
nearestElement = nearestElementFocusableParent;
|
||||
}
|
||||
}
|
||||
focus(nearestElement);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue