mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 18:18:17 -06:00
Cause: the click-to-edit fields (hot numbers and revolutions, the Timeline time display and layer comments, Project rename/comment, the Render Queue output path, Essential Graphics control names) opened a text edit with egui's default caret at the end of the text, so typing appended to the old value. The Timeline time display, layer comment and Essential Graphics name editors also re-requested focus before checking `lost_focus()`, which hid the loss, so Enter, Escape and clicking away never closed them. Fix: a shared `widgets::keep_focus` keeps an open inline editor focused and selects its whole text on the frame it opens (`widgets::select_all`, which the layer rename now reuses). Those editors check for a lost focus first, and Escape now cancels in the time display and the Essential Graphics name editor. Test: ui_angles `typing_replaces_the_clicked_value` (degrees and revolutions in Effect Controls, Timeline and Properties, typed without Ctrl+A); ui_inline_edit `project_rename_replaces_the_name` and `timecode_field_replaces_commits_and_cancels`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>