igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igx-grid - cell repeats switching edit mode during pressing the Enter key.

Open tkiryu opened this issue 8 years ago • 5 comments

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

  1. Go to https://stackblitz.com/edit/igx-grid-editing-issue
  2. Click a cell.
  3. 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

tkiryu avatar Oct 19 '18 08:10 tkiryu

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 avatar Oct 22 '18 10:10 nrobakova

@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 avatar Oct 26 '18 07:10 tkiryu

@tkiryu What will be a case where the user will hold down Enter/F2 repeatedly?

rkaraivanov avatar Oct 26 '18 07:10 rkaraivanov

@tkiryu is there a convenient use case for this functionality?

zdrawku avatar Nov 07 '18 12:11 zdrawku

@tkiryu I am closing this issue with reason by-design.

zdrawku avatar Nov 19 '18 13:11 zdrawku