This commit is contained in:
Rachel Macfarlane
2018-01-31 15:33:18 -08:00
parent 76c9741faa
commit 2768a68da8

View File

@@ -277,9 +277,8 @@ export class IssueReporter extends Disposable {
for (let i = 0; i < numResultsToDisplay; i++) {
const link = $('a', { href: items[i].html_url });
link.textContent = items[i].title;
link.addEventListener('click', (event) => {
shell.openExternal((<HTMLAnchorElement>event.target).href);
});
link.addEventListener('click', openLink);
link.addEventListener('auxclick', openLink);
const item = $('li', {}, link);
issues.appendChild(item);
@@ -496,3 +495,12 @@ function hide(el) {
function show(el) {
el.classList.remove('hidden');
}
function openLink(event: MouseEvent) {
event.preventDefault();
event.stopPropagation();
// Exclude right click
if (event.which < 3) {
shell.openExternal((<HTMLAnchorElement>event.target).href);
}
}