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

IgxGrid - Cell selection does not update visually if you click on the text part of a grid cell.

Open rmkrmk opened this issue 8 years ago • 1 comments

Description

Cell selection does not update visually if you click on the text part of a grid cell. In IE 11 only.

  • igniteui-angular version: igniteui-angular version: 6.2.x
  • browser: browser: IE11

Steps to reproduce

  1. Load dev demos and open the first grid sample (named "Grid")
  2. Click on a cell (for example "Chai") but click on the white area of the cell
  3. Now click on another cell (for example "Aniseed Syrup") but this time click on the text itself.

Result

The selection highlight is not updated and the first cell still looks selected. However if you try to navigate with the keyboard the correct cell is highlighted.

Expected result

The cell selection highlight should work correctly no matter if you are clicking on the cell's text or the cell's white space.

rmkrmk avatar Nov 05 '18 12:11 rmkrmk

The behavior is caused by an issue in Internet Explorer 11. The browser prevents the div's parent container to get focus. The fix for IE should be enabled by adding a registry key in the Registry Editor - Fix for Internet Explorer

As a workaround, when the div element receives focus it could be moved to the IgxGridCellComponent.

cell.component.html: <ng-container ... > <div class="igx-grid__td-text" (focus)="changeFocus()">...</div> </ng-container> <ng-template ...> <div class="igx-grid__td-text" (focus)="changeFocus()">...</div> </ng-template>

cell.component.ts: public changeFocus() { this.nativeElement.focus(); }

mtsvyatkova avatar Nov 13 '18 11:11 mtsvyatkova