-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clicking on links where text is a code block #11529
Comments
@timabbott I don't think there is any bug here, as this worked for me (see gif below). |
Try Chrome? |
hm, working for me on Chrome as well. (Though it sounds like the original issue is not browser-specific?) |
ok, I reproed. The link has to come from a linkification filter. (Kunal, let me know if that doesn't make sense.) |
@rishig Yes, a brief explanation would be helpful. 😅 |
@kunal-mohta you need to setup a "Linkifier" in organization settings, and then generate a link like that. You can get the source content for Tommy's message and copy the relevant Linkifier from chat.zulip.org's organization settings to set this up in your development environment. |
I should have linked to https://zulipchat.com/help/add-a-custom-linkification-filter. |
The issue is not specific to links with text as code blocks, it is purely related to the linkifier. Even with simple text, syntax like: [some text here](#12345) points to [edit] The compose box opens maybe because the click propagates to the code block, simply clicking the link doesn't open the compose box. |
The problem is the realm filter is expanded before the link, so at some point in the renderer the markdown is transformed into [some text](<a href="https://github.com/zulip/zulip/pull/123" target="_blank" title="https://github.com/zulip/zulip/pull/123">#123</a>) @zulipbot claim |
@aero31aero FYI since this is a markdown processor ordering bug. |
Interesting. I believe this was present before the recent changes to ordering as well. It shouldn't be too hard to fix. @zulipbot claim Edit: just saw Tommy has claimed it. |
Hello @aero31aero, it looks like someone has already claimed this issue! Since we believe multiple assignments to the same issue may cause some confusion, we encourage you to search for other unclaimed issues to work on. However, you can always reclaim this issue if no one is working on it. We look forward to your valuable contributions! |
You can chat with Tommy and collaborate -- he might benefit from your context. |
Ok so I fixed the frontend markdown. My solution is a bit of a hack 😬 since I got round the ordering problem by replacing the realm filter with a marker before rendering and inserting the link afterwards. @aero31aero would you mind reviewing my PR? |
Hello @tommyip, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. You can reclaim this issue or claim any other issue by commenting Thanks for your contributions, and hope to see you again soon! |
Apparently, if you do this syntax, e.g.:
Opened [
Update TypeScript infrastructure and migrate dict.js](#11513) for review.
We generate a link formatted as a code block, which is nice, but clicking the link just opens compose, probably due to a click handler ordering/precedence issue. See for example:
https://chat.zulip.org/#narrow/stream/65-checkins/topic/Tommy.20Ip/near/697676
This may be a bit tricky to fix, since debugging this sort of click handler ordering issue can be challenging.
The text was updated successfully, but these errors were encountered: