input: Fix Input to unselect on blur. (#1303)
This commit is contained in:
parent
5e504d10bb
commit
aca03d47c0
1 changed files with 6 additions and 1 deletions
|
|
@ -2058,10 +2058,14 @@ impl InputState {
|
|||
}
|
||||
|
||||
fn on_blur(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if !self.is_context_menu_open(cx) {
|
||||
if self.is_context_menu_open(cx) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.hover_popover = None;
|
||||
self.diagnostic_popover = None;
|
||||
self.context_menu = None;
|
||||
self.unselect(window, cx);
|
||||
self.blink_cursor.update(cx, |cursor, cx| {
|
||||
cursor.stop(cx);
|
||||
});
|
||||
|
|
@ -2069,6 +2073,7 @@ impl InputState {
|
|||
root.focused_input = None;
|
||||
});
|
||||
cx.emit(InputEvent::Blur);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
fn pause_blink_cursor(&mut self, cx: &mut Context<Self>) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue