Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code Quality: Fixed keyboard shortcuts when refocusing window #17502

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

Merged
yaira2 merged 6 commits into main from ya/FocusTitlebar
Aug 29, 2025

Conversation

Copy link
Member

@yaira2 yaira2 commented Aug 28, 2025
edited
Loading

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. Clicked Toolbar
  2. Confirmed keyboard shortcuts work
  3. Repeated test with TitleBar
  4. Confirmed these changes don't cause issues with Dual Pane

@yaira2 yaira2 force-pushed the ya/FocusTitlebar branch 3 times, most recently from cfd737e to f88c5dd Compare August 28, 2025 23:31
@yaira2 yaira2 requested a review from Copilot August 29, 2025 00:14
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 keyboard shortcuts that were not working properly when refocusing the window after clicking empty areas like the toolbar or title bar. The changes implement a pane locking mechanism during layout changes and improve focus management across the application.

  • Introduces a pane locking system to prevent focus loss during layout transitions
  • Adds pointer event handling to restore focus when clicking empty window areas
  • Standardizes focus management by replacing direct control focus calls with centralized pane focus methods
  • Automatically closes the layout flyout after selecting a layout option

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
ShellPanesPage.xaml.cs Adds IsActivePaneLocked property and LockActivePane method, updates focus handling logic
MainPage.xaml.cs Adds PointerReleased event handler to restore focus when clicking empty areas
MainPage.xaml Registers PointerReleased event handler
BaseLayoutPage.cs Updates focus restoration logic with conditional pane focus
ShellViewModel.cs Locks active pane during layout mode changes
MainPageViewModel.cs Replaces direct control focus with centralized pane focus method
Toolbar.xaml.cs Adds click handler to hide layout flyout
Toolbar.xaml Adds flyout name and click handlers to layout radio buttons
IShellPanesPage.cs Adds LockActivePane method to interface
PreviousTabAction.cs Replaces direct control focus with centralized pane focus method
NextTabAction.cs Replaces direct control focus with centralized pane focus method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@yaira2 yaira2 merged commit a1b843b into main Aug 29, 2025
8 checks passed
@yaira2 yaira2 deleted the ya/FocusTitlebar branch August 29, 2025 00:58
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

Copilot code review Copilot Copilot left review comments

Assignees
No one assigned
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: Keyboard shortcuts don't work after clicking blank area in TitleBar or Toolbar
1 participant

AltStyle によって変換されたページ (->オリジナル) /