Select collab channel filter query upon focusing (#29383)
In the process of implementing this I learned that you can also hit escape to clear the query which is a decent workaround, but I think this behavior more closely matches expectations. For example when you run the "focus search" actions, those select the query. Release Notes: - N/A
This commit is contained in:
parent
ebb39d9231
commit
c39adc5242
1 changed files with 9 additions and 0 deletions
|
@ -65,6 +65,15 @@ pub fn init(cx: &mut App) {
|
|||
cx.observe_new(|workspace: &mut Workspace, _, _| {
|
||||
workspace.register_action(|workspace, _: &ToggleFocus, window, cx| {
|
||||
workspace.toggle_panel_focus::<CollabPanel>(window, cx);
|
||||
if let Some(collab_panel) = workspace.panel::<CollabPanel>(cx) {
|
||||
collab_panel.update(cx, |panel, cx| {
|
||||
panel.filter_editor.update(cx, |editor, cx| {
|
||||
if editor.snapshot(window, cx).is_focused() {
|
||||
editor.select_all(&Default::default(), window, cx);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
workspace.register_action(|_, _: &OpenChannelNotes, window, cx| {
|
||||
let channel_id = ActiveCall::global(cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue