Fix shell search suggestion pick after dismissing OSK with B#101
Fix shell search suggestion pick after dismissing OSK with B#101CyberoniOntoni wants to merge 2 commits into
Conversation
|
Reopening stacked on feature/xbox-shell-focus so the PR is a single commit. |
686005f to
387bdeb
Compare
0a7511d to
bcdd623
Compare
|
|
||
| if (GamepadInput.IsBackKey(e.Key)) | ||
| { | ||
| // Dismissing the OSK can spuriously fire QuerySubmitted with the first suggestion. |
There was a problem hiding this comment.
Is this "can" or "does"? Trying to understand if the platform is quirky or flaky.
For added robustness, can you add something like this in the SearchBox_TextChanged when the reason is UserInput (ie add to your existing if).
// a real keystroke means any pending dismiss-suppression is stale
_ignoreQuerySubmittedCount = 0;There was a problem hiding this comment.
Actually, can you use a time-window debounce instead of a counter? That may be more robust regardless of whether it's exactly 2 or not.
There was a problem hiding this comment.
Is this "can" or "does"? Trying to understand if the platform is quirky or flaky.
It did.
There was a problem hiding this comment.
Actually, can you use a time-window debounce instead of a counter? That may be more robust regardless of whether it's exactly 2 or not.
okay :)
There was a problem hiding this comment.
Is this "can" or "does"? Trying to understand if the platform is quirky or flaky.
It did.
Sorry I realize I was unclear here (and possibly interpreted as a bit rude). What i meant by this was, does it happen sometimes intermittently ("it can") or does it always happen and exactly the same number of times ("it does").
This is moot though if you make it a time Window since it won't matter exactly the number of times the event fires.
There was a problem hiding this comment.
Is this "can" or "does"? Trying to understand if the platform is quirky or flaky.
It did.
Sorry I realize I was unclear here (and possibly interpreted as a bit rude). What i meant by this was, does it happen sometimes intermittently ("it can") or does it always happen and exactly the same number of times ("it does").
This is moot though if you make it a time Window since it won't matter exactly the number of times the event fires.
its ok. happened each time, when I tried navigating into a search result field.
AutoSuggestBox.SuggestionChosen throws InvalidCastException for custom suggestion items on Xbox. Handle gamepad A/Enter via PreviewKeyDown, mouse/touch via Tapped, and keyboard via QuerySubmitted.ChosenSuggestion. Suppress spurious QuerySubmitted after B dismisses the OSK.
bcdd623 to
c173ee6
Compare
|
There are few more bugs that need to be addressed:
|
What & why
Bugfix for a search panel. Pressing "B" to dismiss the on-screen keyboard while shell search suggestions are open navigated to the first result automatically. Had to suppress those dismiss events so the user can browse suggestions with the d-pad and confirm with "A".
Merge after #98. Review commit
387bdebonly (MainPage.xaml,MainPage.xaml.cs).Out of scope
Shell search implementation is in #98.
Fully tested on XBSX