diff --git a/crates/egui/src/widgets/text_edit/builder.rs b/crates/egui/src/widgets/text_edit/builder.rs index 587f498b0a2..633b5bee67b 100644 --- a/crates/egui/src/widgets/text_edit/builder.rs +++ b/crates/egui/src/widgets/text_edit/builder.rs @@ -1,6 +1,5 @@ use std::sync::Arc; -use emath::Rect; use epaint::text::{cursor::CCursor, Galley, LayoutJob}; use crate::{ @@ -723,16 +722,6 @@ impl<'t> TextEdit<'t> { } } - // Allocate additional space if edits were made this frame that changed the size. This is important so that, - // if there's a ScrollArea, it can properly scroll to the cursor. - let extra_size = galley.size() - rect.size(); - if extra_size.x > 0.0 || extra_size.y > 0.0 { - ui.allocate_rect( - Rect::from_min_size(outer_rect.max, extra_size), - Sense::hover(), - ); - } - painter.galley(galley_pos, galley.clone(), text_color); if has_focus {