Fixed terminal stealing focus

This commit is contained in:
Mikayla Maki 2022-09-27 16:43:32 -07:00
parent 75594fc3e3
commit 9b32678b05

View file

@ -453,13 +453,15 @@ impl TerminalElement {
} }
} }
}) })
.on_scroll(TerminalElement::generic_button_handler( .on_scroll(move |event, cx| {
connection, // cx.focus_parent_view();
origin, if let Some(conn_handle) = connection.upgrade(cx.app) {
move |terminal, origin, e, _cx| { conn_handle.update(cx.app, |terminal, cx| {
terminal.scroll_wheel(e, origin); terminal.scroll_wheel(event, origin);
}, cx.notify();
)); })
}
});
// Mouse mode handlers: // Mouse mode handlers:
// All mouse modes need the extra click handlers // All mouse modes need the extra click handlers