Skip to content

ListDetailsView steals focus away when user clicks in details #4257

Open
@michael-hawker

Description

@michael-hawker

Describe the bug

Found this while testing #4255, but behavior is the same with the new code from that PR as it was in 7.0, so just creating a new bug for tracking in next release.

Basically, it appears the first time after the ListDetailsView has loaded, if you click on a TextBox added to the details content of the control, the focus will switch back to the list instead of staying in the TextBox.

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Go to the ListDetailsView sample
  2. Modify the DetailsTemplate and replace the entire RelativePanel with a TextBox control.
  3. Click on an item in the list
  4. Then click on the Textbox
  5. Note now focus is back in the list (use arrow keys to confirm), but expect it to be still in the Textbox where I clicked.

Only occurs first time on load, and only for a short time after selecting the first items to load the details in the list, if you wait a few seconds the issue won't occur.

Expected behavior

Focus should remain in TextBox.

Environment

Package Version(s): 7.0 and latest main

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • 19043
  • Insider Build ({build_number})

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

Device form factor:

  • Desktop
  • Xbox
  • Surface Hub
  • IoT

Visual Studio version:

  • 2017 (15.{minor_version})
  • 2019 (16.{minor_version})
  • 2022 (17.{minor_version})

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorcontrols 🎛️

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions