From dcd61986005640f08494833dedd9420605e526b8 Mon Sep 17 00:00:00 2001 From: Anastasiia Glushkova Date: Thu, 14 Nov 2024 16:28:49 +0100 Subject: [PATCH] fix(core): do not delay dropdown focus trap deactivation (#603) Co-authored-by: anastasiia_glushkova --- core/src/components/cat-dropdown/cat-dropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/components/cat-dropdown/cat-dropdown.tsx b/core/src/components/cat-dropdown/cat-dropdown.tsx index 14f72884..18e6b821 100644 --- a/core/src/components/cat-dropdown/cat-dropdown.tsx +++ b/core/src/components/cat-dropdown/cat-dropdown.tsx @@ -182,6 +182,7 @@ export class CatDropdown { } this.isOpen = null; + this.trap?.deactivate(); this.content.classList.remove('show'); // give CSS transition time to apply setTimeout(() => { @@ -189,7 +190,6 @@ export class CatDropdown { this.content.classList.remove('show'); this.content.style.display = ''; this.trigger?.setAttribute('aria-expanded', 'false'); - this.trap?.deactivate(); this.catClose.emit(); }, timeTransitionS); }