Fix up keybindings propagation

Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Piotr Osiewicz
2023-11-09 18:33:36 +01:00
co-authored by Conrad
parent d184e0d426
commit 194d615691
8 changed files with 41 additions and 13 deletions
+4
View File
@@ -4149,12 +4149,16 @@ fn build_key_listeners(
build_key_listener(
move |editor, key_down: &KeyDownEvent, dispatch_context, phase, cx| {
if phase == DispatchPhase::Bubble {
dbg!(&dispatch_context);
if let KeyMatch::Some(action) = cx.match_keystroke(
&global_element_id,
&key_down.keystroke,
dispatch_context,
) {
dbg!("got action", &action);
return Some(action);
} else {
dbg!("not action");
}
}