-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Issue: Ctrl + A Shortcut Blocked Inside Inline Editing Fields
Version:
@swimlane/ngx-datatable 21.0.0
Problem:
When using ngx-datatable, the Ctrl + a shortcut — typically used to select all content within a text field — is being captured by the table and does not propagate up the DOM chain.
This causes a usability issue in scenarios such as inline editing:
- If a user focuses on a text input inside a table cell and attempts to use
Ctrl + ato select all content in that input, the shortcut has no effect. - Selecting text manually (via double-clicking) still works, so it’s not a critical blocker — but behavior-wise, the table should ideally allow universal shortcuts like
Ctrl + ato function naturally within form fields.
Example:
You can reproduce this issue by visiting the official Inline Editing Example from the documentation:
- Double-click a cell to activate inline editing.
- Try using
Ctrl + ainside the input field. - Notice that nothing happens — the text isn't selected.
Expected Behavior:
Universal shortcuts like Ctrl + A should work as expected inside form fields within ngx-datatable. The table should not prevent or capture these shortcuts when focus is inside an editable input element.
Related Code:
It appears this behavior is caused by this part of the code:
body-row.component.ts#L195
Suggestion:
Consider updating the keyboard event handler to skip processing when the event target is a form input element (e.g., input, textarea, select, or content-editable element).