diff --git a/components/lib/datatable/DataTable.vue b/components/lib/datatable/DataTable.vue index 7f0b8e8271..23ab70991f 100755 --- a/components/lib/datatable/DataTable.vue +++ b/components/lib/datatable/DataTable.vue @@ -794,9 +794,9 @@ export default { this.rowTouched = false; if (focusedItem) { - if (e.originalEvent.target.getAttribute('data-pc-section') === 'rowtogglericon' || e.originalEvent.target.parentElement.getAttribute('data-pc-section') === 'rowtogglericon') return; + if (event.target?.getAttribute('data-pc-section') === 'rowtogglericon' || event.target?.parentElement?.getAttribute('data-pc-section') === 'rowtogglericon') return; - const targetRow = e.originalEvent.target.closest('tr[data-p-selectable-row="true"]'); + const targetRow = event.target?.closest('tr[data-p-selectable-row="true"]'); focusedItem.tabIndex = '-1'; targetRow.tabIndex = '0';