fix: avoid text_input paragraph updates in diff

This commit is contained in:
Ashley Wulber 2023-11-30 17:47:39 -05:00 committed by Ashley Wulber
parent 225bbabe34
commit 5f2e83b04d

View file

@ -483,22 +483,6 @@ where
fn diff(&mut self, tree: &mut Tree) {
let state = tree.state.downcast_mut::<State>();
// TODO get values from renderer somehow.
replace_paragraph(
state,
Layout::new(&layout::Node::with_children(
Size::INFINITY,
vec![layout::Node::with_children(
Size::INFINITY,
vec![layout::Node::default()],
)],
)),
&self.value,
self.font.unwrap_or(crate::font::FONT),
Pixels(self.size.unwrap_or(14.0)),
self.line_height,
);
// Unfocus text input if it becomes disabled
if self.on_input.is_none() {
state.last_click = None;