From 9b7fc3797e486b7b53e686f33f07eca5c47fc51a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 2 Jan 2025 12:28:57 +0100 Subject: [PATCH] UX: do not tab to an already active tab (#30531) --- .../javascripts/discourse/app/components/more-topics.gjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/more-topics.gjs b/app/assets/javascripts/discourse/app/components/more-topics.gjs index e14c77be195..c34577fd11c 100644 --- a/app/assets/javascripts/discourse/app/components/more-topics.gjs +++ b/app/assets/javascripts/discourse/app/components/more-topics.gjs @@ -64,6 +64,11 @@ export default class MoreTopics extends Component { }); } + @action + isActiveTab(tab) { + return tab?.id === this.selectedTab?.id; + } +