Open links from comments in a new window |
|||
Issue descriptionCurently 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).
,
Jan 24 2017
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".
,
Jan 24 2017
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 :)
,
Jan 24 2017
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.
,
Jan 24 2017
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!
,
Feb 1 2017
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 |
|||
Comment 1 by seanmccullough@chromium.org
, Jan 24 2017Status: Available (was: Untriaged)