Incorrect focus order with conditionally rendered cell elements

#4999 · open · 0 comments

View on GitHub ↗

zstoyanova9

### Description When a Grid cell template contains focusable buttons inside an `@if` block followed by another focusable button outside the conditional block, entering the cell with **Enter** or **F2** can focus the later, always-rendered button instead of the first button in the rendered DOM. This is unexpected according to the following documented behavior of multiple focusable elements in the Grid cells (**Enter** or **F2** enters the cell and focuses the first focusable element): https://www.telerik.com/kendo-angular-ui/components/grid/keyboard-navigation#focusing-elements-in-templates ### Steps To Reproduce 1. Open the following StackBlitz example - https://stackblitz.com/edit/ezqrt2p9 2. Press **Tab** to enter the Grid. 3. Use the arrow keys to navigate to the first row and focus the cell under the Actions column. 4. Press **Enter** or **F2**. ### Actual Behavior Focus moves to the Edit button, even though View precedes it in the rendered cell. ### Expected Behavior Focus should move to the View button, the first focusable button in the rendered cell.

Comments