fix(ui): replace `event.srcElement` with `event.target`
We should not use `event.srcElement` it's proprietary, we should use the
standard `event.target`. Too bad that the type definitions are not up to
date for `EventTarget`.
@@ -105,7 +105,8 @@ export class ApiConnectorInfoComponent implements OnInit {
@HostListener('document:click', ['$event'])
private onDocumentClick(event: Event): void {
- const elementTag = event.srcElement.tagName.toLowerCase();
+ const element: any = event.target;
+ const elementTag = element.tagName.toLowerCase();
if (elementTag !== 'input' && elementTag !== 'textarea' && this.editControlKey) {
setTimeout(() => this.onSubmit(), 0);
}
