A platform for community discussion. Free, open, simple.
UX: fix tag & category clicks on mobile topic list (#20449)
Kris90ed30b3ff19
diff --git a/app/assets/javascripts/discourse/app/components/topic-list-item.js b/app/assets/javascripts/discourse/app/components/topic-list-item.jsindex 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 constraintsif (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.scssindex 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 mobilepointer-events: none;}