supporting middle click for opening links

This commit is contained in:
Nicolas Constant 2019-03-02 00:44:54 -05:00
parent 17ad6faaef
commit e736ad8c08
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 10 additions and 0 deletions

View File

@ -172,6 +172,16 @@ export class DatabindedTextComponent implements OnInit {
window.open(link, '_blank');
return false;
});
this.renderer.listen(el, 'mouseup', (event) => {
if(event.which === 2){
event.preventDefault();
event.stopImmediatePropagation();
window.open(link, '_blank');
return false;
}
});
}
}