Refactor: Improve error handling
parent
ae90cc0e34
commit
8764814a19
|
@ -40,7 +40,7 @@ const FocusTrap = BaseFocusTrap.extend('focustrap', {
|
||||||
: DomHandler.getFirstFocusableElement(el, this.getComputedSelector(el.$_pfocustrap_focusableselector))
|
: DomHandler.getFirstFocusableElement(el, this.getComputedSelector(el.$_pfocustrap_focusableselector))
|
||||||
: DomHandler.getFirstFocusableElement(_el);
|
: DomHandler.getFirstFocusableElement(_el);
|
||||||
|
|
||||||
return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : _el.nextSibling ? findNextFocusableElement(_el.nextSibling) : null;
|
return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : _el.nextSibling && findNextFocusableElement(_el.nextSibling);
|
||||||
};
|
};
|
||||||
|
|
||||||
DomHandler.focus(findNextFocusableElement(mutation.nextSibling));
|
DomHandler.focus(findNextFocusableElement(mutation.nextSibling));
|
||||||
|
|
Loading…
Reference in New Issue