Skip to content

Default selection is wrong #28

@nicopap

Description

@nicopap

If no "prioritized" exist, we should at least try to find a focusable in the root menu

self.focusables
    .iter()
    // The focused focusable.
    .find_map(|(e, focus)| (focus.state == Focused).then(|| e))
    // Prioritized focusable within the root menu (if it exists)
    .or_else(root_prioritized)
    // Any prioritized focusable
    .or_else(any_prioritized)
    // Any focusable
    .or_else(fallback)

The current fallback method only checks for a prioritized in the root menu, then any prioritized. Before going for "any prioritized" it should go for "any in root menu".

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions