1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

element array instead of node list

This commit is contained in:
Kyle Spearrin 2018-06-05 13:28:09 -04:00
parent 22c12cf5c4
commit 66b3dbae17

View File

@ -10,14 +10,14 @@ import {
})
export class BoxRowDirective implements OnInit {
el: HTMLElement = null;
formEls: NodeListOf<Element>;
formEls: Element[];
constructor(private elRef: ElementRef) {
this.el = elRef.nativeElement;
}
ngOnInit(): void {
this.formEls = this.el.querySelectorAll('input:not([type="hidden"]), select, textarea');
this.formEls = Array.from(this.el.querySelectorAll('input:not([type="hidden"]), select, textarea'));
this.formEls.forEach((formEl) => {
formEl.addEventListener('focus', (event: Event) => {
this.el.classList.add('active');