View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0023661||Lazarus||LCL||public||2013-01-16 13:08||2013-02-03 01:58|
|Reporter||Ian Goddard||Assigned To||Jesus Reyes|
|Summary||0023661: TStringGrid focus issue|
|Description||There exists a condition in which the grid has focus but no cell has an explicit focus. Nevertheless a cell does have an implicit focus.|
One instance is when the grid is first displayed and has the lowest tab order value or when it has been tabbed to from another control. If the user has previously had the cursor on a specific cell of the grid and tabs back from another control then that cell receives the implicit focus, otherwise it goes to the first cell.
Another is when the user is navigating the grid by tab, has reached the last tabbable cell and presses tab again. If there is another control to which focus can pass then it will do so, otherwise the focus remains on the grid, the last cell visited loses explicit focus but retains implicit focus.
In each case each successive key press will overwrite the contents of the cell with the implied focus.
If the cell is empty the subsequent behaviour looks odd but is harmless. If the user tries to type in a series of characters the cell simply displays a single character, replacing it each time the key is pressed.
If, however, the user has already entered data in the cell this data will be overwritten by the next key press. The user would probably not consider this behaviour harmless. There is no visual feedback to the user to indicate that the cell contents are vulnerable in this way.
There a three alternatives to minimise the impact of this.
1. The situation left as it is at present but with the contents at risk highlighted.
2. The cell should have explicit focus and behave appropriately. If the cell has already had data entered the cursor should returned be at its last known position if that's possible.
3. If no cell has explicit focus any keys other then navigation keys should be ignored.
|Tags||No tags attached.|
|Fixed in Revision|