Middle/Right Clicking on Username of Profile Card takes you to the page you are viewing, not the profile

AI-generated summary

A bug has been reported where middle/right clicking on a username in a profile card takes users to the current page instead of the user’s profile. cpradio shared screenshots demonstrating the issue, which affects both topic reading and the topic list.

tgxworld identified the issue as stemming from this commit. tgxworld asked eviltrout about the original problem the commit aimed to solve and proposed a potential fix using link-to and handling the user card click event.

eviltrout provided a proper fix in this commit.

When reading a topic, click on a user to open their user card, then right-click and choose open in new tab or middle click (on either red circled area), you are taken to the page you are currently viewing, not their profile

Happens on Topic list too

7 curtidas

Hmm this is due to this commit.

@eviltrout May I check with you what problem the original commit was trying to solve? Even after switching back to link-to, the user-card seems to close once it transitions away to another route.

I’m trying to put up a fix which uses link-to and handles the user card click event in the view that will close the user card. Is that the right direction?

Thanks!

I believe it dealt with open the user card for User A on the topic list, now click on User B’s username to open their User Card

1 curtida

@cpradio Ah got it. Thanks :smile:

Here’s a proper fix:

https://github.com/discourse/discourse/commit/0a9e2f54ff8f97ebac800dd027715347b5f70976

5 curtidas