Skip to content

Commit

Permalink
Prevent click throughs
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Mar 18, 2020
1 parent daa5137 commit 06aaaee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span *ngIf="isLink" class="link">
<ng-container *ngIf="showShortLink">
<div *ngIf="linkValue" class="link__short">
<a class="link__short__icon" [href]="linkValue" [attr.target]="linkTarget">
<a class="link__short__icon" [href]="linkValue" [attr.target]="linkTarget" (click)="$event.stopPropagation()">
<mat-icon>launch</mat-icon>
</a>
<a [href]="linkValue" [attr.target]="linkTarget">View</a>
Expand All @@ -14,11 +14,12 @@
</ng-container>
</ng-container>
<ng-container *ngIf="!showShortLink">
<a [href]="linkValue" [attr.target]="linkTarget" *ngIf="isExternalLink">
<ng-container *ngTemplateOutlet="valueTemplate; context: valueContext"></ng-container>
<a [href]="linkValue" [attr.target]="linkTarget" *ngIf="isExternalLink" (click)="$event.stopPropagation()"></a>
<ng-container *ngTemplateOutlet="valueTemplate; context: valueContext"></ng-container>
</a>
<a [routerLink]="linkValue" [attr.target]="linkTarget" *ngIf="!isExternalLink">
<ng-container *ngTemplateOutlet="valueTemplate; context: valueContext"></ng-container>
<a [routerLink]="linkValue" [attr.target]="linkTarget" *ngIf="!isExternalLink"
(click)="$event.stopPropagation()"></a>
<ng-container *ngTemplateOutlet="valueTemplate; context: valueContext"></ng-container>
</a>
</ng-container>
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a (click)="showSidePanel()">
<a (click)="showSidePanel(); $event.stopPropagation()">
{{actualConfig?.text}}
</a>

0 comments on commit 06aaaee

Please sign in to comment.