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

Keyboard navigation on the igx-grid doesn't work when igx-grid is in the ig-tabs

Open tkiryu opened this issue 8 years ago • 4 comments

Description

Keyboard navigation on the igx-grid doesn't work when igx-grid is in the ig-tabs.

Steps to reproduce

  1. Go to https://stackblitz.com/edit/igx-grid-in-igx-tabs
  2. Click a cell.
  3. Press arrow left/right key.

Result

Tabs switches.

Expected result

Keyboard navigation on the igx-grid should be priority.

tkiryu avatar Apr 23 '18 01:04 tkiryu

@tkiryu The sample you provided can't be open :)

SlavUI avatar Apr 23 '18 07:04 SlavUI

@SlavUI Oh, really? I am able to open it, though... Anyway, what I did was simply put igx-grid into the igx-tabs.

  <igx-tabs>
    <igx-tabs-group label="Tab1">
      <igx-grid [xxx]="yyy"></igx-grid>
    </igx-tabs-group>
    <igx-tabs-group label="Tab2"></igx-tabs-group>
  </igx-tabs>

I'm attaching a sample just in case. igx-grid-in-igx-tabs.zip

tkiryu avatar Apr 23 '18 08:04 tkiryu

I looked into this and it seems that the igx-tabs changes the active tab on arrow left/right when something in the content panel is focused regardless of whether it’s a grid or something else. For instance, here’s a sample with tabs with simple input element: https://stackblitz.com/edit/igx-grid-in-igx-tabs-b1j5yx?file=app/app.component.html Note that once the focus is on the input arrow left/right will change the active tab, disallowing you to change the cursor position inside the input.

It should change the active tab only when the actual tab header element is focused. Actions done on the content should not affect it.

As this does not seem to be related to the grid I am removing the grid tag and assigning it to the related team.

MayaKirova avatar Apr 23 '18 11:04 MayaKirova

Fixed and merged

sboykova avatar May 10 '18 10:05 sboykova