Overlays that change the root widget shape can drop text-input focus (follow-up to #485) #552

Open
opened 2026-11-14 12:45:21 +00:00 by charles · 0 comments
Owner

Follow-up to #485 (fixed for the pins/inbox/search popouts in PR #540).

Problem. main::view in crates/fluxer-ui/src/screens/main/mod.rs still wraps the screen conditionally for other overlays (expression picker, panel soundboard, context menus, modals): the root is the plain screen when the overlay is closed and a stack![screen, …] when it is open. In iced, changing the shape of the root rebuilds widget state below it, so a focused text input loses focus the moment the overlay opens or closes. That was the cause of #485 (the search box accepted one character).

Likely symptoms. The composer or another text field losing focus or its cursor when one of these overlays opens or closes while you type.

To do.

  • Give every overlay the shape header_popouts::over now uses: always stack![screen], pushing the backdrop and the overlay only when open.
  • Add a focus test per overlay, modelled on crates/fluxer-ui/tests/search_focus.rs::search_bar_keeps_focus_while_suggestions_open.

Related gap from #535. The "Add reaction" submenu of the message menu still shows still (non-animated) emoji; the hover bar and the menu's quick row animate since PR #540. Check what the original client does there and match it.

Follow-up to #485 (fixed for the pins/inbox/search popouts in PR #540). **Problem.** `main::view` in `crates/fluxer-ui/src/screens/main/mod.rs` still wraps the screen conditionally for other overlays (expression picker, panel soundboard, context menus, modals): the root is the plain screen when the overlay is closed and a `stack![screen, …]` when it is open. In iced, changing the shape of the root rebuilds widget state below it, so a focused text input loses focus the moment the overlay opens or closes. That was the cause of #485 (the search box accepted one character). **Likely symptoms.** The composer or another text field losing focus or its cursor when one of these overlays opens or closes while you type. **To do.** - Give every overlay the shape `header_popouts::over` now uses: always `stack![screen]`, pushing the backdrop and the overlay only when open. - Add a focus test per overlay, modelled on `crates/fluxer-ui/tests/search_focus.rs::search_bar_keeps_focus_while_suggestions_open`. **Related gap from #535.** The "Add reaction" submenu of the message menu still shows still (non-animated) emoji; the hover bar and the menu's quick row animate since PR #540. Check what the original client does there and match it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#552
No description provided.