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

MultiSelect: Scroll to focused item on select #2957

Closed
blackjak231 opened this issue Sep 12, 2022 · 2 comments
Closed

MultiSelect: Scroll to focused item on select #2957

blackjak231 opened this issue Sep 12, 2022 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@blackjak231
Copy link

blackjak231 commented Sep 12, 2022

Describe the bug

Observed behaviour

Selecting an item in MultiSelect scrolls to focused item before setting new focus.

ezgif-2-20a6833b8b

Reproducer

No response

PrimeVue version

3.17.0

Vue version

3.x

Language

ALL

Build / Runtime

Vue CLI App

Browser(s)

All

Steps to reproduce the behavior

  1. Go to https://www.primefaces.org/primevue/multiselect
  2. Click on any dropdown (best results with "Grouped")
  3. Scroll down to "Osaka" (for grouped example)
  4. Select "Osaka"
  5. List scrolls back to top
    (repeatable if you select others)

Expected behavior

Selecting an item in MultiSelect should select the item and keep me at the same scroll position

@blackjak231 blackjak231 added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 12, 2022
@blackjak231 blackjak231 changed the title MultiSelect: Strange "auto-scroll" on select MultiSelect: Scroll to focused item on select Sep 12, 2022
@blackjak231
Copy link
Author

Okay, after playing around a bit more, I realized that this issue happens if the option autoOptionFocus is true. (value is true by default).

Solution

For anyone trying to fix this, you simply need to set autoOptionFocus to false. If you need to keep the autoOptionFocus on, then this will need to be addressed in PrimeVue.

@blackjak231 blackjak231 reopened this Sep 12, 2022
@mertsincan mertsincan self-assigned this Sep 12, 2022
@mertsincan mertsincan added this to the 3.17.1 milestone Sep 12, 2022
@mertsincan
Copy link
Member

Thanks a lot for your report! I'll check it and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants