Fire focus handlers on draw to avoid timing with newly created item

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Julia
2023-12-13 12:16:39 -05:00
co-authored by Antonio Scandurra
parent 226d4929b5
commit cfc050e3fe
5 changed files with 84 additions and 162 deletions
+1 -7
View File
@@ -1,6 +1,5 @@
use crate::{
div, point, Div, Element, FocusHandle, IntoElement, Keystroke, Modifiers, Pixels, Point,
Render, ViewContext,
div, point, Div, Element, IntoElement, Keystroke, Modifiers, Pixels, Point, Render, ViewContext,
};
use smallvec::SmallVec;
use std::{any::Any, fmt::Debug, marker::PhantomData, ops::Deref, path::PathBuf};
@@ -290,11 +289,6 @@ impl InputEvent {
}
}
pub struct FocusEvent {
pub blurred: Option<FocusHandle>,
pub focused: Option<FocusHandle>,
}
#[cfg(test)]
mod test {
use crate::{