From 518004a01477b1d9e981ae26dcc8e03b941b60f4 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 29 Jul 2025 17:55:53 +0800 Subject: [PATCH] input: Fix to let set_value works when Input is disabled. (#1103) --- crates/ui/src/input/state.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ui/src/input/state.rs b/crates/ui/src/input/state.rs index 17b85608..2a7066e6 100644 --- a/crates/ui/src/input/state.rs +++ b/crates/ui/src/input/state.rs @@ -664,7 +664,9 @@ impl InputState { cx: &mut Context, ) { self.history.ignore = true; + let was_disabled = self.disabled; self.replace_text(value, window, cx); + self.disabled = was_disabled; self.history.ignore = false; // Ensure cursor to start when set text if self.mode.is_single_line() {