Maximizing Tile in Focus / Keyboard Enter

I'm using the Tile View Databinding sample approach to implement a dashboard type interface for my application.

My issue is with using the keyboard and the tab key to set focus and then pressing the enter key to trigger the tile open. If I use the keyboard to set focus to a tile, and then press enter to activate it, my dashboard crashes. This is  reproducible in the sample  as well. 

The problem is in the StateChangeBehavior.cs, in  AssociatedObject_Click event, which is triggered when enter key is pressed.

The click event is relying on the Target.SelectedIndex to pull the item from the item container generator. On the focus/enter case, this is -1, causing index out of bounds and a crash.

I need a way to get the index of the focused item so I can trigger the maximize tile action for the focused tile. 

Looking at the Target object, I can see in the debugger a FocusedInfo object that would give me the index but I do not have access to that programmatically.

Is there a way to get this information from Target object?

3 Replies

SK Senthil Kumaran Rajan Syncfusion Team August 19, 2020 01:13 PM UTC

Hi Sheri, 

Thank you for using Syncfusion product. 

The reported behavior is occurred due to the ItemContainerStyle in that sample. We have modified the sample based on your requirement. This application opens the tile item without any crash on pressing the enter key. 


Please check this sample and let us know whether you reported behavior has been resolved. 

Regards, 
Senthil 



UN Unknown August 19, 2020 07:05 PM UTC

The updated sample does not resolve the issue.

If I do not click on any tiles at all, and use the tab key to move the focus rectangle to a tile, hitting enter will still crash with an index out of bounds.
Interestingly, tabbing will cause a larger focus rectangle around the tile where hitting enter does nothing. Tabbing once more gives a smaller focus rectangle on the same tile, hitting enter with this smaller focus rectangle causes the crash.

If I've clicking on a tile with the mouse to maximize it, then I can tab to a different tile and hit enter. At this point it doesn't crash, but it also opens the incorrect tile, opening the previous one I clicked on instead of the one I have the focus rectangle set to.

On a side note, I am running an older version of the libraries - v 17.3.0.14.


SK Senthil Kumaran Rajan Syncfusion Team August 20, 2020 11:45 AM UTC

Hi Sheri, 

Sorry for the inconvenience. 

The sample that we have shared on our previous update opens only the first item. On further analysis we could found that the SelectedIndex is not updated properly while selecting the TileViewItem using keyboard. This issue will be fixed and included in our upcoming Volume 3, 2020 release. Please let us know if you need further assistance. 

Regards, 
Senthil 


Loader.
Up arrow icon