igx-grid - cell repeats switching edit mode during pressing the Enter key.
Description
Cell repeats switching edit mode during pressing the Enter key.
- igniteui-angular version: 6.1.7, 6.2.0-beta.3
- browser: N/A
Steps to reproduce
- Go to https://stackblitz.com/edit/igx-grid-editing-issue
- Click a cell.
- Press and hold down the Enter key for a while.
Result
A selected cell repeats switching edit mode during pressing the Enter key.
Expected result
A selected cell should not repeat switching edit mode during pressing the Enter key.
Attachments
https://stackblitz.com/edit/igx-grid-editing-issue
This is by design. When a cell is selected and press Enter Key it opens in edit mode. When a cell is opened in edit mode and press Enter key the edit mode closes and the cell is only selected. If you hold the Enter key the cell start switching between edit mode and selected. Here is the documentation: https://github.com/IgniteUI/igniteui-angular/wiki/Grid-Editing#end-user
@nrobakova , even though it is by design, from a usability point of view, it is annoying, isn't it?
I think event.repeat can easily fix the behavior.
Like this: https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/grid/cell.component.ts#L805
case 'enter':
case 'f2':
if (event.repeat) {
return;
}
this.onKeydownEnterEditMode(event);
break;
Could you consider my idea, please?
@tkiryu What will be a case where the user will hold down Enter/F2 repeatedly?
@tkiryu is there a convenient use case for this functionality?
@tkiryu I am closing this issue with reason by-design.