git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit07e4a75bcc3aeffd88dfb4396c06013d419770f4
parent8e7a099df0
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-08 12:24
refactor(focus): focus the dialog's dropdown through UiContext

cce-ui's widget::focus thread-local is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/dialog.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dialog.rs b/src/dialog.rs
index 89330c7..6de93ea 100644
--- a/src/dialog.rs
+++ b/src/dialog.rs
@@ -2649,7 +2649,7 @@ impl State {
         // Opened as the toolkit opens one from the keyboard: focused, then
         // Enter, which unfolds it with the current option highlighted.
         let dd_id = self.slots.dialog.dropdown.base().id();
-        cce_ui::widget::focus::set_focused_id(dd_id, Some(&mut self.ui_context));
+        self.ui_context.set_focused_id(dd_id);
         let enter = Event::KeyInput(KeyEvent {
             state: ElementState::Pressed,
             logical_key: Key::Named(NamedKey::Enter),