From 2ece878bd56d925cea30c5407045489c294d6ad8 Mon Sep 17 00:00:00 2001 From: Feb Dao Date: Mon, 11 Nov 2024 08:47:35 +0700 Subject: [PATCH] [#370] Fixed sub-navigation active tabindex. (#423) --- components/00-base/collapsible/collapsible.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/00-base/collapsible/collapsible.js b/components/00-base/collapsible/collapsible.js index a9d7c6ac..70af6562 100644 --- a/components/00-base/collapsible/collapsible.js +++ b/components/00-base/collapsible/collapsible.js @@ -53,12 +53,11 @@ function CivicThemeCollapsible(el) { this.panel.addEventListener('click', (e) => e.stopPropagation()); this.panel.addEventListener('focusout', this.focusoutEvent.bind(this)); - // Init focusable elements. - this.initFocusableElements(this.panel); - // Collapse if was set as initially collapsed. if (this.collapsed) { this.collapse(); + // Init focusable elements for data-collapsible-collapsed only. + this.initFocusableElements(this.panel); } this.el.addEventListener('ct.collapsible.collapse', (evt) => {