Channel search box only accepts one character (focus lost when suggestions open) #485

Closed
opened 2026-11-14 07:29:29 +00:00 by charles · 1 comment
Owner

Reported by dr_flash_amazing in #flaxative-bug-reports (post, 2026-11-14):

type in the search box in the text channel. it only allows me to type one letter. bad!

Steps to reproduce

  1. Open any text channel.
  2. Click the "Search messages" box in the channel header.
  3. Type a word.

Expected: the whole word is typed and filter suggestions update as you type.
Actual: only the first letter appears; further keystrokes go nowhere until you click the box again (then again only one letter).

Cause (from reading the code, at bea187b)

  • search::update sets state.suggesting = true on the first Message::Edit (crates/fluxer-ui/src/screens/main/search/mod.rs:69-72).
  • screens/main/mod.rs:1178-1187 then returns over(screen, popout, …), i.e. stack![screen, backdrop, popout] instead of plain screen.
  • The root widget changes type, so iced diffs a new tree and rebuilds every widget state under it: the search text_input loses focus after the first character.
  • The inbox, pins and other popouts use the same return over(…) pattern, so any of them opening while a text input is focused will drop focus the same way.

Suggested fix

Keep the tree shape stable: always return a stack! whose first child is screen, and push the backdrop/popout layers only when open (or render an empty layer when closed). Add a UI test that types several characters into the search bar and checks the query and focus.

**Reported by** dr_flash_amazing in #flaxative-bug-reports ([post](https://fluxer.forked.io/channels/1554245914976059392/1571061323297456128), 2026-11-14): > type in the search box in the text channel. it only allows me to type one letter. bad! ## Steps to reproduce 1. Open any text channel. 2. Click the "Search messages" box in the channel header. 3. Type a word. **Expected:** the whole word is typed and filter suggestions update as you type. **Actual:** only the first letter appears; further keystrokes go nowhere until you click the box again (then again only one letter). ## Cause (from reading the code, at bea187b) - `search::update` sets `state.suggesting = true` on the first `Message::Edit` (`crates/fluxer-ui/src/screens/main/search/mod.rs:69-72`). - `screens/main/mod.rs:1178-1187` then returns `over(screen, popout, …)`, i.e. `stack![screen, backdrop, popout]` instead of plain `screen`. - The root widget changes type, so iced diffs a new tree and rebuilds every widget state under it: the search `text_input` loses focus after the first character. - The inbox, pins and other popouts use the same `return over(…)` pattern, so any of them opening while a text input is focused will drop focus the same way. ## Suggested fix Keep the tree shape stable: always return a `stack!` whose first child is `screen`, and push the backdrop/popout layers only when open (or render an empty layer when closed). Add a UI test that types several characters into the search bar and checks the query and focus.
Author
Owner

Fixed by PR #540 (merge 2e1825b), published in nightly 2026.1114.297. Forum post marked ✅.

Fixed by PR #540 (merge 2e1825b), published in nightly 2026.1114.297. Forum post marked ✅.
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#485
No description provided.