post: fix bug where send shortcut send unfocused inputs
Fixes: https://github.com/damus-io/notedeck/issues/810 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -396,7 +396,9 @@ impl<'a, 'd> PostView<'a, 'd> {
|
||||
(i.modifiers.ctrl || i.modifiers.command) && i.key_pressed(egui::Key::Enter)
|
||||
});
|
||||
|
||||
if post_button_clicked || (!self.draft.buffer.is_empty() && shortcut_pressed) {
|
||||
if post_button_clicked
|
||||
|| (!self.draft.buffer.is_empty() && shortcut_pressed && self.focused(ui))
|
||||
{
|
||||
let output = self.draft.buffer.output();
|
||||
let new_post = NewPost::new(
|
||||
output.text,
|
||||
|
||||
Reference in New Issue
Block a user