prevent caret jumping when typing text
@@ -1143,12 +1143,7 @@ impl Control for TextBox {
text.set_text(new_text);
drop(text);
self.invalidate_layout();
-
- // Make sure caret will stay in valid bounds.
self.formatted_text.borrow_mut().build();
- if !self.is_valid_position(self.caret_position) {
- self.set_caret_position(self.end_position());
- }
if self.commit_mode == TextCommitMode::Immediate {
ui.send_message(message.reverse());
