Make command dispatching work

This commit is contained in:
Conrad Irwin
2023-11-09 15:14:23 -07:00
parent a1d9f351db
commit fa153a0d56
11 changed files with 188 additions and 118 deletions
-4
View File
@@ -4149,16 +4149,12 @@ 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");
}
}