Skip to content

Commit

Permalink
clear cursor when unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
msparkles committed Jul 2, 2024
1 parent 46d0a0e commit c6a5866
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/yakui-widgets/src/widgets/textbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ impl Widget for TextBoxWidget {
self.active = *focused;
if !*focused {
self.lost_focus = true;
if let Some(editor) = self.cosmic_editor.get_mut() {
editor.set_cursor(cosmic_text::Cursor::new(0, 0));
}
}
EventResponse::Sink
}
Expand Down

0 comments on commit c6a5866

Please sign in to comment.