-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TableView
's CollectionNavigator
sometimes doesn't work right
#3885
Comments
Maybe was scroll lock or numlock on? I have not noticed this myself |
I still see this sometimes. Have not been able to consistently repro it. |
I got a repo... It has to do with this timing related code: public int GetNextMatchingItem (int currentIndex, char keyStruck)
{
if (!char.IsControl (keyStruck))
{
// maybe user pressed 'd' and now presses 'd' again.
// a candidate search is things that begin with "dd"
// but if we find none then we must fallback on cycling
// d instead and discard the candidate state
var candidateState = "";
// is it a second or third (etc) keystroke within a short time
if (SearchString.Length > 0 && DateTime.Now - _lastKeystroke < TimeSpan.FromMilliseconds (TypingDelay))
{
// "dd" is a candidate
candidateState = SearchString + keyStruck;
}
else
{
// its a fresh keystroke after some time
// or its first ever key press
SearchString = new string (keyStruck, 1);
} But setting breakpoints in there "fixes" the problem. Hm.... |
Maybe easiest way to handle this is after v2 drivers is merged, we add extensive logging here and when it happens do a retro on the logs. |
I have added lots of trace logging into this class in #3837 , see for example (normal behaviour): Hopefully this will make it clearer next time it happens
|
I really can't repo this 🤷♂ |
Try this:
It will not navigate to "Windows and Frameviews" If you don't do step 1 above, it won't repo. It's almost 100% repo for me now if I do the above. |
How to |
Close the Terminal window. |
But it's already closed. I usually close when exit debugging. But I still can't repo. It's strange. Can you make a gif that show the issue, please? |
@tig if you can repro and can also repro on the v2 drivers branch then the logs should tell us what is going on in the collection navigator. They get generated in the |
Ok I already repo it, but only if I click on the second column (Description). Thus it not found anything that start with "w". That's not an issue, I think. |
The only way to achieve what you want is changing the protected override object ElementAt (int idx)
{
int col = tableView.FullRowSelect ? 0 : tableView.SelectedColumn;
object rawValue = tableView.Table [idx, col];
ColumnStyle style = tableView.Style.GetColumnStyleIfAny (col);
return style?.RepresentationGetter?.Invoke (rawValue) ?? rawValue;
} No matter which column is clicked it's always be considered the first column. |
That's it! I never noticed I was sometimes clicking on the 1st column vs 2nd. Wanna submit a PR? |
I can't always reproduce this (like right now), but sometimes the Scenario List in UI Catalog doesn't respond to collection navigator keypresses correctly.
When this happens, the category view works fine but the scenario view refuses to coopeate. Pressing
b
for example goes to some random scenario instead ofBars
.If anyone encounters this while in the debugger please try to debug!
The text was updated successfully, but these errors were encountered: