Describe the bug
Pressing Tab on a MultiSelect that has selected items deselects one of them instead of just moving focus. This happens in two situations:
- Panel open — tabbing out of the open panel deselects the currently focused option.
- Panel never opened (
autoOptionFocus) — simply tabbing past a closed field deselects the first selected option, without the panel ever being opened (note: only on the first tab-through after the component mounts).
Reproduced on vue@3.5.38 and vue@3.4.31 (StackBlitz template), primevue@4.5.5, @primeuix/themes@2.0.3.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-xwgspziq?file=src%2FApp.vue
Environment
OS: MacOS 26.5.1
Browser: Microsoft Edge
Vue version
3.5.38
PrimeVue version
4.5.5
Node version
24.17.0
Browser(s)
Microsoft Edge 149.0.4022.80
Steps to reproduce the behavior
Case 1 — Tab while the panel is open
- Render a
MultiSelect with :showToggleAll="false" and three of five options selected ([1, 2, 3]).
- Click the field to open the panel (an option becomes focused/highlighted).
- Press
Tab.
- Selection drops to
[1, 2] — the focused option was toggled off.
Case 2 — Tab past the field without opening it (autoOptionFocus)
- Render a
MultiSelect with autoOptionFocus and three of five options selected ([1, 2, 3]).
- Focus the element before it, press
Tab to move focus into the field — do not open it.
- Press
Tab again to move past it.
- Selection drops to
[2, 3] — the first selected option was toggled off, although the panel was never opened.
A runnable reproduction (both cases) is in the attached StackBlitz / App.vue.
Expected behavior
Pressing Tab should only move focus (and close the panel if it is open). It should never add or remove a selected option.
Describe the bug
Pressing
Tabon aMultiSelectthat has selected items deselects one of them instead of just moving focus. This happens in two situations:autoOptionFocus) — simply tabbing past a closed field deselects the first selected option, without the panel ever being opened (note: only on the first tab-through after the component mounts).Reproduced on
vue@3.5.38andvue@3.4.31(StackBlitz template),primevue@4.5.5,@primeuix/themes@2.0.3.Pull Request Link
No response
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-xwgspziq?file=src%2FApp.vue
Environment
OS: MacOS 26.5.1
Browser: Microsoft Edge
Vue version
3.5.38
PrimeVue version
4.5.5
Node version
24.17.0
Browser(s)
Microsoft Edge 149.0.4022.80
Steps to reproduce the behavior
Case 1 — Tab while the panel is open
MultiSelectwith:showToggleAll="false"and three of five options selected ([1, 2, 3]).Tab.[1, 2]— the focused option was toggled off.Case 2 — Tab past the field without opening it (
autoOptionFocus)MultiSelectwithautoOptionFocusand three of five options selected ([1, 2, 3]).Tabto move focus into the field — do not open it.Tabagain to move past it.[2, 3]— the first selected option was toggled off, although the panel was never opened.A runnable reproduction (both cases) is in the attached StackBlitz /
App.vue.Expected behavior
Pressing
Tabshould only move focus (and close the panel if it is open). It should never add or remove a selected option.