Repeatedly pressing Ctrl-Tab gets stuck at the bottom of the list of LayoutItems #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current logic in the Ctrl-Tab processing in the Navigator window expects there to be a mixture of both LayoutAnchorables and LayoutDocuments. But if you only have a list of one or the other type the Ctrl-Tab selection does not loop to the top of the list, it stays stuck on the last item as it is expecting to jump across to the other list (you can see this behaviour in MLibTest app which only has LayoutAnchorables, once you ctrl-tab to the bottom of the list the blue highlight stays stuck there and that last Anchorable will get focus once you release the ctrl-tab. (note you need to keep the ctrl key held down and tap on the tab key to cycle the selected item)
This pull request adds a check in each set of conditions so that the selected item will loop to the top of the current list (either Anchorables or Documents) if the other list has 0 items.
I had a go at trying to build a Unit Test for this, but I could not see how to make this work. I believe I need to be on the UI thread to interact with the UI elements, but the NavigatorWindow calls ShowDialog which seems to block the test... But in my manual testing this works fine.