Skip to content

Commit

Permalink
Fixed #9804 - Space key causes scroll the browser when using Table se…
Browse files Browse the repository at this point in the history
…lection
  • Loading branch information
yigitfindikli committed Jan 22, 2021
1 parent 79c66d8 commit 3ce9964
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2781,6 +2781,11 @@ export class SelectableRow implements OnInit, OnDestroy {
});
}

@HostListener('keydown.space', ['$event'])
onSpaceKeyDown(event: KeyboardEvent) {
event.preventDefault();
}

findNextSelectableRow(row: HTMLTableRowElement): HTMLTableRowElement {
let nextRow = <HTMLTableRowElement> row.nextElementSibling;
if (nextRow) {
Expand Down

0 comments on commit 3ce9964

Please sign in to comment.