Skip to content

Commit d9b80ac

Browse files
committed
Update text_input.rs
1 parent a575e62 commit d9b80ac

1 file changed

Lines changed: 2 additions & 13 deletions

File tree

widget/src/text_input.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,18 +274,6 @@ where
274274
tree::State::new(State::<Renderer::Paragraph>::new())
275275
}
276276

277-
fn diff(&self, tree: &mut Tree) {
278-
let state = tree.state.downcast_mut::<State<Renderer::Paragraph>>();
279-
280-
// Unfocus text input if it becomes disabled
281-
if self.on_input.is_none() {
282-
state.last_click = None;
283-
state.is_focused = None;
284-
state.is_pasting = None;
285-
state.is_dragging = false;
286-
}
287-
}
288-
289277
fn size(&self) -> Size<Length> {
290278
Size {
291279
width: self.width,
@@ -1139,7 +1127,8 @@ pub fn draw<Theme, Renderer>(
11391127
.as_millis()
11401128
/ CURSOR_BLINK_INTERVAL_MILLIS)
11411129
% 2
1142-
== 0;
1130+
== 0
1131+
&& !is_disabled;
11431132

11441133
let cursor = if is_cursor_visible {
11451134
Some((

0 commit comments

Comments
 (0)