Skip to content

Fix: Fixed an issue where the home key wouldn't move focus when renaming items #17127

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

Conversation

AkhilReddy-Ramireddy
Copy link
Contributor

@AkhilReddy-Ramireddy AkhilReddy-Ramireddy commented May 13, 2025

This commit addresses the issue where pressing the Home key during file renaming in List View (and other views
inheriting from BaseGroupableLayoutPage) did not move the cursor to the absolute beginning of the filename if the
filename was longer than the visible TextBox. The fix ensures that textBox.SelectionStart is set to 0 and
textBox.SelectionLength is set to 0 when the Home key is pressed, providing behavior consistent with Windows
Explorer.

Resolved / Related Issues
Resolves #15048

@Lamparter
Copy link
Contributor

Did you mean to link to #14253?

@AkhilReddy-Ramireddy AkhilReddy-Ramireddy changed the title Fix: Ensure Home key moves cursor to start of filename during rename Fix: Ensure Home key moves cursor to start of filename during rename Resolves #14253 May 13, 2025
@AkhilReddy-Ramireddy AkhilReddy-Ramireddy changed the title Fix: Ensure Home key moves cursor to start of filename during rename Resolves #14253 Fix: Ensure Home key moves cursor to start of filename during rename May 13, 2025
@Josh65-2201
Copy link
Member

@AkhilReddy-Ramireddy Please link to the correct issue, #14253 is a PR

@AkhilReddy-Ramireddy
Copy link
Contributor Author

Hi @Lamparter, thanks for checking! Yes, the PR description correctly links to issue #14253. I've also updated the PR title to remove any confusion.

@yaira2
Copy link
Member

yaira2 commented May 15, 2025

@AkhilReddy-Ramireddy can you please update the PR description with the correct issue link and steps used to verify these changes? Thank you!

@Lamparter
Copy link
Contributor

#15048 is the correct issue that this PR should link to.

Copy link
Contributor

@Lamparter Lamparter left a comment

Choose a reason for hiding this comment

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

I can confirm that this PR fixes #15048

This commit addresses the issue where pressing the Home key during file renaming in List View (and other views inheriting from BaseGroupableLayoutPage) did not move the cursor to the absolute beginning of the filename if the filename was longer than the visible TextBox. The fix ensures that textBox.SelectionStart is set to 0 and textBox.SelectionLength is set to 0 when the Home key is pressed, providing behavior consistent with Windows Explorer.
@yaira2 yaira2 force-pushed the fix/home-key-rename-navigation branch from f8d51df to ca8a74e Compare June 12, 2025 20:13
@yaira2 yaira2 changed the title Fix: Ensure Home key moves cursor to start of filename during rename Fix: Fixed an issue where the home key wouldn't move focus when renaming items Jun 12, 2025
Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Jun 12, 2025
@yaira2 yaira2 merged commit ba53823 into files-community:main Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
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