From faceb989bf04f5ae75e8a31cdb728037c15ca7a5 Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 26 Aug 2022 16:00:01 -0400 Subject: [PATCH] remove focus from sidebar header toggle click (#18088) --- .../javascripts/discourse/app/components/sidebar/section.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/sidebar/section.js b/app/assets/javascripts/discourse/app/components/sidebar/section.js index c5da94691ec..7b348f64e44 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/section.js +++ b/app/assets/javascripts/discourse/app/components/sidebar/section.js @@ -39,6 +39,11 @@ export default class SidebarSection extends Component { } else { this.keyValueStore.setItem(this.collapsedSidebarSectionKey, true); } + + // remove focus from the toggle, but only on click + if (!event.key) { + document.activeElement.blur(); + } } @action