input: Fix to let set_value works when Input is disabled. (#1103)
This commit is contained in:
parent
7487662343
commit
518004a014
1 changed files with 2 additions and 0 deletions
|
|
@ -664,7 +664,9 @@ impl InputState {
|
||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
self.history.ignore = true;
|
self.history.ignore = true;
|
||||||
|
let was_disabled = self.disabled;
|
||||||
self.replace_text(value, window, cx);
|
self.replace_text(value, window, cx);
|
||||||
|
self.disabled = was_disabled;
|
||||||
self.history.ignore = false;
|
self.history.ignore = false;
|
||||||
// Ensure cursor to start when set text
|
// Ensure cursor to start when set text
|
||||||
if self.mode.is_single_line() {
|
if self.mode.is_single_line() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue