Skip to content

Commit

Permalink
TEC-165: Fix focus first directive to exclude disabled inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chamara Abesinghe committed Nov 15, 2023
1 parent 9ae72c5 commit fa204fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/src/directives/focus-first-element/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export interface FocusFirstHTMLElement extends HTMLElement {
activeElement?: Element | null;
}

const focusableElements = 'input, select, textarea, [tabindex], [href]';
const focusableElements =
'input:not([disabled]), select, textarea, [tabindex], [href]';
const excludeElements =
'button:not(.oxd-dialog-close-button,.modal-reset-button,[disabled])';
const firstFocusedElementsOnMounted = new Map<string | null, Element>();
Expand Down

0 comments on commit fa204fb

Please sign in to comment.