Make focusing the parent an effect to avoid querying ancestors
This commit is contained in:
parent
d6b0569bed
commit
80ad59a620
5 changed files with 53 additions and 33 deletions
|
@ -370,7 +370,7 @@ impl TerminalElement {
|
|||
f: impl Fn(&mut Terminal, Vector2F, E, &mut ModelContext<Terminal>),
|
||||
) -> impl Fn(E, &mut TerminalView, &mut EventContext<TerminalView>) {
|
||||
move |event, _: &mut TerminalView, cx| {
|
||||
cx.focus_parent_view();
|
||||
cx.focus_parent();
|
||||
if let Some(conn_handle) = connection.upgrade(cx) {
|
||||
conn_handle.update(cx, |terminal, cx| {
|
||||
f(terminal, origin, event, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue