M8: Keyboard shortcuts panel closes on the home screen (#548)

This commit is contained in:
MarekSpodBiedry
2026-10-17 15:03:28 +02:00
parent ac4b98dbd7
commit 96091494a5
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -1414,6 +1414,8 @@ impl FigApp {
return;
}
if !self.has_files() || self.ui.home {
// The shortcuts panel belongs to the canvas; it doesn't hang over the home screen.
self.ui.shortcuts_panel = false;
tabs::tab_bar(self, ui);
home::show(self, ui);
dialogs::keys(self, &ctx);
+9
View File
@@ -188,3 +188,12 @@ fn shortcuts_panel_opens_switches_tabs_and_searches() {
u.app.run("help.shortcuts", json!({}));
assert!(!u.app.ui.shortcuts_panel, "the command toggles it");
}
#[test]
fn shortcuts_panel_does_not_show_on_the_home_screen() {
let mut u = Ui::new(Session::empty());
u.app.ui.home = true;
u.app.ui.shortcuts_panel = true;
u.frame(vec![]);
assert!(!u.app.ui.shortcuts_panel, "the panel closes on the home screen");
}