git.lucas.co / cce-fonts
font browser

commitb9f0b3726d7852aa40db22f96d393ec679007420
parent7fc221ee0c
authorLucas Galante <[email protected]>
date2026-08-30 19:59
fix: an open style dropdown keeps its arrow keys

Family-list arrow navigation consumed ArrowUp/Down ahead of the
widget propagate loop, so the open style dropdown was
keyboard-reachable in every way except hover movement. The list nav
now stands aside while the dropdown is open; Escape and Enter were
already routed.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/main.rs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 8f788e6..2047444 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1404,8 +1404,11 @@ impl Application for TypefaceApp {
             }
         }
 
-        if !handled {
-            // Arrow navigation
+        if !handled && !self.style_dropdown.open {
+            // Arrow navigation — family list only while no dropdown is open:
+            // an open style dropdown takes the arrows for its own hover (via
+            // the propagate loop below), and consuming them here left it
+            // keyboard-navigable in every way except the one that matters.
             let direction = match event.logical_key {
                 Key::Named(NamedKey::ArrowUp) => Some(BrowseNavigation::Up),
                 Key::Named(NamedKey::ArrowDown) => Some(BrowseNavigation::Down),