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: Fixed an issue where the home key wouldn't move focus when renaming items in List View #15225

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nunescostr
Copy link

Summary
The Home and end key weren't being acknowledged by the textBox.Keydown on the List View, Grid View and Tile View Layouts. To fix this I replaced it with textBox.PreviewKeyDown, this way the handling is not being consumed before it reaches the controller. I had to implement specific handling for these keys on the switch case already implemented on the GridLayoutPage.xaml.cs.

Resolved / Related Issues

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
    None.

Screenshots (optional)
None.

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

Pressing the Home key several times now returns the cursor to the top of the textbox, but pressing it once still only returns the cursor to the top of the visible area.

@yaira2 yaira2 changed the title Fix: Home key didn't move to first character when renaming item in List, Grid and Tile View Layout(#15048) Fix: Fixed an issue where the home key wouldn't move focus when renaming items in List View Apr 19, 2024
@yaira2 yaira2 requested a review from hishitetsu May 9, 2024 21:38
Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

I have found this PR makes it impossible to select text with Shift+Up or Shift+Down.

@yaira2
Copy link
Member

yaira2 commented May 12, 2024

Does changing back to KeyDown resolve that issue?

@hishitetsu
Copy link
Member

KeyDown will make the selection, but only to the middle of the text box, not to the beginning or end of the text box in case of Grid/Tiles/List view. Also, the original issue will no longer be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Home key doesn't move to the 1st character when renaming item in List View layout
4 participants