From 980ae68e601a7e907007784f4eeccf008a54d965 Mon Sep 17 00:00:00 2001 From: Chamara Abesinghe Date: Tue, 5 Dec 2023 18:29:04 +0530 Subject: [PATCH] TEC-265: Stop focus first directive from focusing on table columns --- components/src/directives/focus-first-element/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/src/directives/focus-first-element/index.ts b/components/src/directives/focus-first-element/index.ts index ae0caaa0..cb68d37b 100644 --- a/components/src/directives/focus-first-element/index.ts +++ b/components/src/directives/focus-first-element/index.ts @@ -5,9 +5,9 @@ export interface FocusFirstHTMLElement extends HTMLElement { } const focusableElements = - 'input:not([disabled]), select, textarea, [tabindex], [href]'; + 'input:not([disabled]), select, textarea, [tabindex]:not(.oxd-table-header-sort-icon), [href]'; const excludeElements = - 'button:not(.oxd-dialog-close-button,.modal-reset-button,[disabled]), i:not(.oxd-table-header-sort-icon)'; + 'button:not(.oxd-dialog-close-button,.modal-reset-button,[disabled])'; const firstFocusedElementsOnMounted = new Map(); const firstFocusedElementsOnUpdated = new Map(); let previosFocusedElement: Element | null;