Skip to content

Commit

Permalink
Merge pull request #19 from navedqb/4824--fix-console-log-errors-in-i…
Browse files Browse the repository at this point in the history
…nplace

fix: Improve focusable element handling
  • Loading branch information
navedqb authored Nov 15, 2023
2 parents 1ae9ef3 + 186e91b commit ae90cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/focustrap/FocusTrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const FocusTrap = BaseFocusTrap.extend('focustrap', {
: DomHandler.getFirstFocusableElement(el, this.getComputedSelector(el.$_pfocustrap_focusableselector))
: DomHandler.getFirstFocusableElement(_el);

return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : findNextFocusableElement(_el.nextSibling);
return ObjectUtils.isNotEmpty(focusableElement) ? focusableElement : _el.nextSibling ? findNextFocusableElement(_el.nextSibling) : null;
};

DomHandler.focus(findNextFocusableElement(mutation.nextSibling));
Expand Down

0 comments on commit ae90cc0

Please sign in to comment.