Fix menu navigation in remote projects modal (#39965)

Previously we were always adding a `Navigable` entry for the "new WSL
connection" option in this modal, even though we don't have the
corresponding button on non-Windows. This was causing `menu::SelectNext`
to behave incorrectly (focusing the center pane instead) when `Connect
New Server` was selected on macOS and Linux.

Release Notes:

- Fixed a bug with keyboard navigation in the remote project modal.
This commit is contained in:
Cole Miller
2025-10-10 16:07:35 +00:00
committed by GitHub
parent a78b560b8b
commit 5f857ffbb1
+5 -2
View File
@@ -2030,8 +2030,11 @@ impl RemoteServerProjects {
)
.into_any_element(),
)
.entry(state.add_new_server.clone())
.entry(state.add_new_wsl.clone());
.entry(state.add_new_server.clone());
if cfg!(target_os = "windows") {
modal_section = modal_section.entry(state.add_new_wsl.clone());
}
for server in &state.servers {
match server {