Skip to content

Commit

Permalink
fix: ActionBar items moves focus to disabled items. (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
TudorSMR committed Jul 12, 2023
1 parent 299ba4a commit fae0821
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function getFirstSelectableWrappedItem(wrapperItem) {
child = wrapperItem.children[i];

// maybe filter even more elements? (opacity, display='none', position='absolute' ...)
if (child.offsetParent && (child.matches(commons.FOCUSABLE_ELEMENT_SELECTOR) || child.matches('a:not([href])'))) {
if (child.offsetParent && (child.matches(commons.FOCUSABLE_ELEMENT_SELECTOR) || child.matches('a:not([href])')) && !child.hasAttribute('disabled')) {
return child;
}
}
Expand Down

0 comments on commit fae0821

Please sign in to comment.