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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user