Skip to content

Focus not set correctly when switching to slideshow #1

@d2weber

Description

@d2weber

When running the app on Ubuntu 22.04.5 with:

 cargo run -p image-viewer-step-17

If I then click on the "slideshow" button, the keybindings are not working. Only when I change focus to the slideshow-overlay manually with my mouse, it seems to work.

In the docs you suggest to add this to handle_event()

        if self.ui.button(id!(slideshow_button)).clicked(&actions) {
             self.ui
                 .page_flip(id!(page_flip))
                 .set_active_page(cx, live_id!(slideshow));
+            self.ui.view(id!(slideshow.overlay)).set_key_focus(cx);
         }

         if self.ui.button(id!(navigate_left)).clicked(&actions) {

but this does not change anything for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions