New issue
Advanced search Search tips

Issue 684744 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----



Sign in to add a comment

Open links from comments in a new window

Project Member Reported by mariakho...@chromium.org, Jan 24 2017

Issue description

Curently if a comment next to failure contains a link, then clicking on a link loads it in the same tab. Please open link in a new tab instead (just like all the other links on the page already do).
 
Labels: -Infra-DX Milestone-UX
Status: Available (was: Untriaged)
Great catch! This is a change I didn't account for when I switched our formatted test to marked-element's. 

Unfortunately, this might be somewhat tricky to handle properly since markdown's behavior is to open links in the same page, I think. Slightly hackish, but we could always post process the resulting HTML and edit it to add target="_blank". 
After rendering you can .queryAll('A') and add set the target attribute on each. That seems reasonable. Or there might be some way to capture the clicks in some other event handler. Maybe send a PR to the marked repo with a fix that adds this as an option for extra credit :)
Owner: zhangtiff@chromium.org
That sounds simple enough. I think I will want to use .queryAll('A'). Capturing clicks is doable, I think, but seems prone to unwanted side effects. 

The repo for marked looks like it has quite a hefty backlog of pull requests. I would enjoy doing that, but won't block fixing this bug on it. But that would be cool. 
Oh, it looks like there is already an issue for this and the polymer team at least agrees that it's a good change: https://github.com/PolymerElements/marked-element/issues/4 

I will try to make a pull request! 
Status: Fixed (was: Available)
Ahh, for some reason Bugdroid missed that I did this CL: https://chromium-review.googlesource.com/c/434961/ 

This should be live on Sheriff-o-Matic now. :)

Sign in to add a comment