You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1- Set the template-click-events-have-key-events rule to true in tslint.json.
2- Add an element with both a click event handler and a modified key event handler, like <button (click)="handle()" (keydown.enter)="handle()"></button>
Expected behavior
The rule shouldn't detect the lack of a generic key event handlers as a violation, and should consider them as satisfactory.
Describe the bug
I'm having a problem with the aforementioned rule when using modified key events.
For instance:
(keydown.enter)="handler()"
Context and configuration
To Reproduce
1- Set the
template-click-events-have-key-events
rule to true in tslint.json.2- Add an element with both a click event handler and a modified key event handler, like
<button (click)="handle()" (keydown.enter)="handle()"></button>
Expected behavior
The rule shouldn't detect the lack of a generic key event handlers as a violation, and should consider them as satisfactory.
Code
<button (click)="handle()" (keydown.enter)="handle()"></button>
Environment
The text was updated successfully, but these errors were encountered: