From 8a7b494cdf86b9822247718f7665389c06015bf0 Mon Sep 17 00:00:00 2001 From: Chamara Abesinghe Date: Tue, 5 Dec 2023 12:59:30 +0530 Subject: [PATCH] TEC-265: Prevent focus first on table headers --- components/src/directives/focus-first-element/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/src/directives/focus-first-element/index.ts b/components/src/directives/focus-first-element/index.ts index 8b130211..ae0caaa0 100644 --- a/components/src/directives/focus-first-element/index.ts +++ b/components/src/directives/focus-first-element/index.ts @@ -7,7 +7,7 @@ export interface FocusFirstHTMLElement extends HTMLElement { const focusableElements = 'input:not([disabled]), select, textarea, [tabindex], [href]'; const excludeElements = - 'button:not(.oxd-dialog-close-button,.modal-reset-button,[disabled])'; + 'button:not(.oxd-dialog-close-button,.modal-reset-button,[disabled]), i:not(.oxd-table-header-sort-icon)'; const firstFocusedElementsOnMounted = new Map(); const firstFocusedElementsOnUpdated = new Map(); let previosFocusedElement: Element | null;