• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

04 Sep 2023 08:40AM UTC coverage: 15.616% (-74.6%) from 90.2%
0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

Pull #2829

circleci

cmm-va
fix: add test
Pull Request #2829: fix: add tabIndex

300 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

2849 of 13779 relevant lines covered (20.68%)

83.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.67
/src/shared/directives/thy-ctrl-enter.directive.ts
1
import { Directive, Output, ElementRef, EventEmitter, OnInit, NgZone, Renderer2, OnDestroy } from '@angular/core';
2
import { keycodes } from 'ngx-tethys/util';
3

4
/**
5
 * @name thyCtrlEnter
6
 */
7
@Directive({
1✔
8
    selector: '[thyCtrlEnter]',
9
    standalone: true
×
10
})
×
11
export class ThyCtrlEnterDirective implements OnInit, OnDestroy {
×
12
    @Output() thyCtrlEnter = new EventEmitter();
×
13

×
14
    private removeKeydownListenerFn: VoidFunction;
×
15

×
16
    constructor(private ngZone: NgZone, private elementRef: ElementRef, private renderer: Renderer2) {}
×
17

×
18
    onKeydown = (event: KeyboardEvent) => {
×
19
        const keyCode = event.which || event.keyCode;
20
        if ((event.ctrlKey || event.metaKey) && keyCode === keycodes.ENTER) {
21
            event.preventDefault();
22
            this.ngZone.run(() => {
23
                this.thyCtrlEnter.emit(event);
24
            });
×
25
        }
×
26
    };
27

28
    ngOnInit() {
29
        this.ngZone.runOutsideAngular(() => {
×
30
            this.removeKeydownListenerFn = this.renderer.listen(this.elementRef.nativeElement, 'keydown', this.onKeydown);
31
        });
1✔
32
    }
33

34
    ngOnDestroy(): void {
35
        this.removeKeydownListenerFn();
36
    }
1✔
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc