mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 05:33:40 +08:00
FIX: Topic Entrance wasn't showing up on some suggested topics
This commit is contained in:
parent
04bc75b521
commit
3479298a71
|
@ -39,12 +39,21 @@ export default Ember.Component.extend({
|
||||||
if (!this.site.mobileView) { return; }
|
if (!this.site.mobileView) { return; }
|
||||||
|
|
||||||
let target = $(e.target);
|
let target = $(e.target);
|
||||||
|
if (target.closest('.posts-map').length) {
|
||||||
if (target.hasClass('posts-map')) {
|
|
||||||
const topicId = target.closest('tr').attr('data-topic-id');
|
const topicId = target.closest('tr').attr('data-topic-id');
|
||||||
if (topicId) {
|
if (topicId) {
|
||||||
if (target.prop('tagName') !== 'A') {
|
if (target.prop('tagName') !== 'A') {
|
||||||
target = target.find('a');
|
let targetLinks = target.find('a');
|
||||||
|
if (targetLinks.length) {
|
||||||
|
target = targetLinks;
|
||||||
|
} else {
|
||||||
|
targetLinks = target.closest('a');
|
||||||
|
if (targetLinks.length) {
|
||||||
|
target = targetLinks;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const topic = this.get('topics').findBy('id', parseInt(topicId));
|
const topic = this.get('topics').findBy('id', parseInt(topicId));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user