Skip to content

Code Quality: Fixed Omnibar cursor placement when changing text #17249

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Jul 4, 2025

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Confirmed that cursor placement only moves to the end when choosing suggestions

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the Omnibar cursor placement so that the cursor only moves to the end when a suggestion is chosen rather than on every text change.

  • Removed an unused using directive.
  • Added a conditional around the cursor movement logic.
Comments suppressed due to low confidence (2)

src/Files.App.Controls/Omnibar/Omnibar.cs:247

  • [nitpick] The comment above the conditional should be updated (or moved inside the if) to clarify that the cursor movement now only occurs when a suggestion is chosen.
			// Move the cursor to the end of the TextBox

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.

1 participant