From: Simon Glass <simon.glass@canonical.com> Text in a textedit can extend past the right boundary because it is measured before its bbox is set correctly. Call scene_obj_get_hw() after setting the edit text's bbox in scene_txted_calc_dims() to ensure correct word-wrapping. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- boot/scene_textedit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boot/scene_textedit.c b/boot/scene_textedit.c index 160b9457a50..2075cfbd417 100644 --- a/boot/scene_textedit.c +++ b/boot/scene_textedit.c @@ -73,6 +73,11 @@ int scene_txted_calc_dims(struct scene_obj_txtedit *ted, struct udevice *cons) if (ret < 0) return log_msg_ret("sbb", ret); + /* Measure the edit text now that its bbox is set correctly */ + ret = scene_obj_get_hw(scn, ted->tin.edit_id, NULL); + if (ret < 0) + return log_msg_ret("hw", ret); + return 0; } -- 2.43.0