This commit is contained in:
Çetin 2022-01-04 14:33:48 +03:00
parent d588380384
commit 44a70ce065

View File

@ -133,11 +133,9 @@ export class AppMenuComponent implements OnInit {
onKeydown(event: KeyboardEvent) {
const nodeElement = (<HTMLDivElement> event.target);
if (event.key === 'Enter' || event.key === ' '){
event.preventDefault();
}
if (event.key === ' ') {
if (event.code === 'Enter' || event.code === 'Space') {
nodeElement.click();
event.preventDefault();
}
}
}