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

Bug: Entering a directory with keyboard Enter causes focus loss of the directory pane. #13121

Closed
cos1110 opened this issue Aug 2, 2023 · 4 comments · Fixed by #13130
Closed

Comments

@cos1110
Copy link

cos1110 commented Aug 2, 2023

Description

When you enter a directory using the Keyboard 'Enter' key, causes loss of focus of the directory pane, as well as deselection of the first directory item.

Steps To Reproduce

Example of directory structure:

A
  A1
     Target
  A2
  1. You see directory A and have it selected, you press 'Enter'.
  2. Now you are inside A and you see directories A1 and A2.
  3. Chances are that you have lost the focus from the directory pane.
  4. See the workaround bellow to navigate to the Target directory.

WORKAROUND

  1. Press Tab once to restore focus to the pane.
  2. Press Down (you are on A2) to invoke a keyboard update event.
  3. Press Up (you are on A1) to update.
  4. Now you have both the pane active and the item A1 selected.

Requirements

When you press Keyboard Enter in order to enter a directory, the directory pane should remain focused. This would allow fast keyboard-based navigation with keys Enter | Up-Down | Alt-Up.

Files Version

2.5.21.0

Windows Version

10.0.19045

Log File

debug.log

@cos1110 cos1110 added the bug label Aug 2, 2023
@yaira2
Copy link
Member

yaira2 commented Aug 3, 2023

Interestingly, this seems to depend on the directory. It's working fine if I use the enter key to open C:\Windows, but I can reproduce the issue in C:\Users.

If I open a directory from the left-hand sidebar, the focus is correctly moved to the file area.

@yaira2 yaira2 changed the title Entering a directory with keyboard Enter causes focus loss of the directory pane. Bug: Entering a directory with keyboard Enter causes focus loss of the directory pane. Aug 3, 2023
@yaira2
Copy link
Member

yaira2 commented Aug 3, 2023

This is a regression from earlier versions of Files where this worked as expected.

@yaira2 yaira2 moved this from 🆕 New to 🔖 Ready to build in Files task board Aug 3, 2023
@hishitetsu
Copy link
Member

It seems to work fine if the folder has 32 items or more. And this number seems to depend on this code.

if (intermediateAction is not null && (count == 32 || sampler.CheckNow()))

But I have no idea why this happens.

@Josh65-2201 Josh65-2201 moved this from 🔖 Ready to build to 🏗 In progress in Files task board Aug 5, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Files task board Aug 6, 2023
@yaira2
Copy link
Member

yaira2 commented Aug 6, 2023

@cos1110 this issue is fixed in the dev branch and will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants