diff --git a/projects/ngx-datatable/src/lib/components/body/body-row.component.ts b/projects/ngx-datatable/src/lib/components/body/body-row.component.ts index 572e8fafe..ae6095b82 100644 --- a/projects/ngx-datatable/src/lib/components/body/body-row.component.ts +++ b/projects/ngx-datatable/src/lib/components/body/body-row.component.ts @@ -185,7 +185,15 @@ export class DataTableBodyRowComponent implements DoCheck, OnChanges key === Keys.left || key === Keys.right; - const isCtrlA = event.key === 'a' && (event.ctrlKey || event.metaKey); + const isCtrlA = + event.key === 'a' && + (event.ctrlKey || event.metaKey) && + (!event.target || + !(event.target instanceof HTMLElement) || + ((!event.target.closest('input') || + event.target.closest('input[type=checkbox]') || + event.target.closest('input[type=radio]')) && + !event.target.closest('textarea'))); if ((isAction && isTargetRow) || isCtrlA) { event.preventDefault();