Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PanelBar] Initially selected item gets unselected when select event is prevented and another item is clicked #4376

Open
zstoyanova9 opened this issue Jul 29, 2024 · 0 comments

Comments

@zstoyanova9
Copy link

Describe the bug
When a PanelBar item is selected on the initialization of the component and the select event is prevented, the item gets unselected when another item is clicked.

To Reproduce

  1. Open the following StackBlitz example - https://stackblitz.com/edit/panelbar-query-leumtw
  2. Click on an unselected item in the PanelBar.

chrome_lz2oJ9n6OK

Expected behavior
The initially selected PanelBar item should keep its selected state since the select event is prevented when the other item is about to be selected. Therefore, there is no actual change in the current selection and the item should not get unselected.

Additional context
In the current scenario, when using the keyboard navigation after clicking on an unselected item, the following error is thrown in the console - "TypeError: Cannot set properties of undefined (setting 'focused')":

chrome_Qvpdn0J5Xy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant