Repository: vscode
Issue: Can't collapse in Folders panel with directional key if a folder only contains one folder
Labels: bug,file-explorer

Type: <b>Bug</b>

  * Open vscode in an empty workspace
  * Create one folder `foo` in workspace
  * Create one folder `bar` in `foo`
  * Create one file `hello` in `foo/bar`
  * Select `hello` file in `Folders` panel
  * Try to collapse `foo` folder by pressing the left key on the keyboard

You can't because the active element is stuck on `bar` folder.

You can collapse `foo` when you click with the mouse on the arrow.

![image](https://github.com/microsoft/vscode/assets/9248729/25dff352-3104-4ed0-b70c-22bf992a1fff)

VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z)
OS version: Windows_NT x64 10.0.22631
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.67GB (16.64GB free)|
|Process Argv|--crash-reporter-id dd05a514-3434-411c-a1e5-a1c464daedba|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (41)</summary>

Extension|Author (truncated)|Version
---|---|---
ng-template|Ang|18.0.0
pythoncpp-debug|ben|0.3.0
cmake-format|che|0.6.11
vscode-pandoc|Chr|0.4.8
doxdocgen|csc|1.4.0
python-environment-manager|don|1.2.4
xml|Dot|2.5.1
shell-format|fox|7.2.5
minify|Hoo|0.4.3
plantuml|jeb|2.18.1
better-cpp-syntax|jef|1.17.2
language-matlab|Mat|1.2.3
vscode-language-pack-fr|MS-|1.90.2024061209
autopep8|ms-|2024.0.0
black-formatter|ms-|2024.2.0
debugpy|ms-|2024.6.0
isort|ms-|2023.10.1
python|ms-|2024.8.1
vscode-pylance|ms-|2024.6.1
remote-ssh|ms-|0.112.0
remote-ssh-edit|ms-|0.86.0
remote-wsl|ms-|0.88.2
cmake-tools|ms-|1.18.42
cpptools|ms-|1.21.0
cpptools-extension-pack|ms-|1.3.0
powershell|ms-|2024.2.2
remote-explorer|ms-|0.4.3
sftp|Nat|1.16.3
vscode-groovy-lint|Nic|3.3.1
vscode-yaml|red|1.15.0
text-marker|ryu|1.11.0
shader|sle|1.1.5
code-spell-checker|str|3.0.1
code-spell-checker-french|str|0.4.1
cmake|twx|0.0.17
intellicode-api-usage-examples|Vis|0.2.8
vscodeintellicode|Vis|1.3.1
vscode-java-debug|vsc|0.57.0
vscode-java-dependency|vsc|0.23.6
vscode-java-pack|vsc|0.27.0
clang-format|xav|1.9.0

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelc:31048052
dsvsc021:30996838
g316j359:31013175
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
legacy_priority:31077528

```

</details>

<!-- generated by issue reporter -->