Skip to content

[Bug]: Focus on TextButton stays on button with the same index as button pressed on previous page #284

@Marcin-Lach

Description

@Marcin-Lach

Description

An application with multiple pages, each page having a few buttons. When pressing a button at index X on one page, which results in navigating to next page with at least as many buttons as index of a button clicked on previous page, the focus stays on button at index X, instead of switching focus to first button on that page.
See case when selecting "1 player" button on the second page on gif below

Image

Steps to Reproduce

Here are reproduction cases with gifs presenting the issues.

https://github.com/Marcin-Lach/razorConsole-buttonsFocusIssue

Run dotnet run --project ./FocusTestApp_standardButton-withoutLoop to start the application

  1. press enter - you will go to next screen, with first button correctly marked as focused
  2. press enter - you will go back to previous page, with first button correctly marked as focused
  3. press enter again - you will be on second page, press tab twice, to select "1 Players" button
  4. press enter - you will go back to previous page, and the button at index 2 will be focused, instead of 1st button on the page being focused.

Expected Behavior

1st button on a page is focused.

Actual Behavior

Button at the same index, as button pressed on previous page is focused.

Environment

Image

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions