File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,15 @@ export class AnatomyComponent implements OnInit {
94
94
this . editToken = false
95
95
}
96
96
}
97
- // @HostListener ('document:click', ['$event'])
98
- // documentClick(event: MouseEvent) {
99
- // // your click logic
100
- // if(this.editToken && this.tokenSubmitted){
101
- // this.submitToken()
102
- // }
103
- // }
97
+ @HostListener ( 'document:click' , [ '$event' , '$event.target' ] )
98
+ documentClick ( event : MouseEvent , targetElement : HTMLElement ) {
99
+ // your click logic
100
+ if ( targetElement . classList . contains ( 'btn' ) || targetElement . classList . contains ( 'card-body' ) || targetElement . classList . contains ( 'editToken' ) ) {
101
+
102
+ } else if ( this . editToken && ! this . tokenSubmitted ) {
103
+ this . submitToken ( )
104
+ }
105
+ }
104
106
105
107
public nextStep ( ) : void {
106
108
this . stepService . setStep ( 3 ) ;
You can’t perform that action at this time.
0 commit comments