From e736ad8c08d0125ce977db112d7d937544dec219 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Sat, 2 Mar 2019 00:44:54 -0500 Subject: [PATCH] supporting middle click for opening links --- .../databinded-text/databinded-text.component.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/components/stream/status/databinded-text/databinded-text.component.ts b/src/app/components/stream/status/databinded-text/databinded-text.component.ts index 32305709..dfac70be 100644 --- a/src/app/components/stream/status/databinded-text/databinded-text.component.ts +++ b/src/app/components/stream/status/databinded-text/databinded-text.component.ts @@ -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; + } + }); } }