Skip to content
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

Fix BreadcrumbBar KeyDown Handling #8272

Merged
merged 2 commits into from
Mar 14, 2023

Conversation

bkudiess
Copy link
Contributor

Improvements on BreadcrumbBar KeyDown event handling:

  • BreadcrumbBar was moving focus on key Up/Down, so disabling that.
  • Also was marking all keydowns as handled even when not taking any action on it, this PR stops marking them as such.
  • HandleEdgeCaseFocus was copied from RadioButtons, and has no real use on BreadcrumbBar, simplifing the code by removing that, which was affecting the handling of events too.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Mar 11, 2023
@bkudiess
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -450,7 +450,7 @@ bool BreadcrumbBar::MoveFocus(int indexIncrement)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would exit early instead of doing a bunch of unneeded work when indexIncrement == 0:

    if (indexIncrement == 0)
    {
        return false;
    }
    if (auto const& itemsRepeater = m_itemsRepeater.get())
    {
        ...

@bkudiess bkudiess merged commit eceb90f into main Mar 14, 2023
@bkudiess bkudiess deleted the user/bakudies/breadcrumbbar-stop-event-handle branch March 14, 2023 17:12
bkudiess added a commit that referenced this pull request Mar 24, 2023
* Stop marking events as handled when no action is taken

* Prevent focus move on Up and Down arrow

(cherry picked from commit eceb90f)
bkudiess added a commit that referenced this pull request Apr 7, 2023
* Stop marking events as handled when no action is taken

* Prevent focus move on Up and Down arrow

(cherry picked from commit eceb90f)
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants