Skip to content

[proposal] Consistent API for event handling #3767

Open
@AgDude

Description

@AgDude

Consistent keyboard and mouse event handling

Capturing keyboard and mouse events within the grid can be challenging, largely because focus is often "faked". In order to effectively address #3695 (highlight cells and copy to the clipboard) keyboard events need to be captured within the grid, as well as mouse/touch "drag" and click/shift-click. The other area that would make sense to make more consistent is handling click, touch, hold, and drag events on column headers. These are a frequent cause for breakage in sorting, movecolumn and columnmenu.

Mouse/Touch actions

Click/touch

This can be a challenge when we need to delay detection to ensure that we aren't waiting for a hold/drag. See #3333.

Hold in place

Mostly used for touch devices, but may as well support mouse too.

Drag

On touch we need to have some "hold in place" time threshold to initiate the drag in order differentiate when the user is trying to scroll and when they are trying drag an object.
Needs to block text selection.

Keyboard actions

Standard keyboard events, but we need to know if the user has focus within the grid. Especially if there are multiple grids on the page. There should also be a publicApi to expose keyboard events within the grid. For example maybe someone wants to capture ctrl-r to refresh the data in the grid.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions