Skip to content

Ctrl + a Shortcut Blocked Inside Inline Editing Fields #2239

@SebastianoOlivo

Description

@SebastianoOlivo

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 + a to 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 + a to function naturally within form fields.

Example:
You can reproduce this issue by visiting the official Inline Editing Example from the documentation:

  1. Double-click a cell to activate inline editing.
  2. Try using Ctrl + a inside the input field.
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions