From 90ed30b3ff192b7ddab123c697b39a99c5f9941b Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 24 Feb 2023 15:29:57 -0500 Subject: [PATCH] UX: fix tag & category clicks on mobile topic list (#20449) --- .../javascripts/discourse/app/components/topic-list-item.js | 6 +++--- app/assets/stylesheets/mobile/topic-list.scss | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-list-item.js b/app/assets/javascripts/discourse/app/components/topic-list-item.js index 16247e89c85..f0dfb2277e1 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list-item.js +++ b/app/assets/javascripts/discourse/app/components/topic-list-item.js @@ -260,9 +260,9 @@ export default Component.extend({ // make full row click target on mobile, due to size constraints if ( this.site.mobileView && - (e.target.classList.contains("right") || - e.target.classList.contains("topic-item-stats") || - e.target.classList.contains("main-link")) + e.target.matches( + ".topic-list-data, .main-link, .right, .topic-item-stats, .topic-item-stats__category-tags, .discourse-tags" + ) ) { if (wantsNewWindow(e)) { return true; diff --git a/app/assets/stylesheets/mobile/topic-list.scss b/app/assets/stylesheets/mobile/topic-list.scss index ac239517577..ca766154a56 100644 --- a/app/assets/stylesheets/mobile/topic-list.scss +++ b/app/assets/stylesheets/mobile/topic-list.scss @@ -189,9 +189,13 @@ .topic-item-stats__category-tags { margin-right: 0.5em; - .category, + .discourse-tags { display: inline; + } + + .badge-wrapper, + .discourse-tag { // disabling clicks because these targets are too small on mobile pointer-events: none; }