Skip to content

Commit cef3328

Browse files
NigelBreslawogoffart
authored andcommitted
live-preview: Auto highlight property on focus (#9588)
When clicking a property the value was not being highlighted. So as you would type the value or '0' would be left and you would end up seeing `x: 030`. This now adds the expected behaviour where the value is highlighted on focus and typing replaces the whole value.
1 parent 0357e2e commit cef3328

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/lsp/ui/components/widgets/basics.slint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export component ResettingLineEdit {
7171
// self.text = root.default-text;
7272
root.can-compile = true;
7373
}
74+
if self.has_focus {
75+
self.select-all();
76+
}
7477
}
7578
}
7679
}

0 commit comments

Comments
 (0)