Skip to content

fix: Prevent Spectrum Picker from selecting new value after closing#8475

Open
snowystinger wants to merge 3 commits intomainfrom
fix-picker-select-after-close
Open

fix: Prevent Spectrum Picker from selecting new value after closing#8475
snowystinger wants to merge 3 commits intomainfrom
fix-picker-select-after-close

Conversation

@snowystinger
Copy link
Member

@snowystinger snowystinger commented Jun 30, 2025

Closes #7537

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Go to V3 storybook or v3 docs for Picker. Select an option with your mouse, then, as the popover is closing, quickly click where another item used to be.

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jun 30, 2025

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rspbot
Copy link

rspbot commented Jul 9, 2025

@rspbot
Copy link

rspbot commented Jul 11, 2025

@devongovett
Copy link
Member

reproduces in safari as well

@yihuiliao yihuiliao changed the title fix: Picker select after close fix: Prevent Spectrum Picker from selecting new value after closing Jul 25, 2025
@snowystinger
Copy link
Member Author

Yeah, I haven't figured out what's wrong yet

Copy link
Member Author

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick summary, I was correct that the selection is happening as the popover is animating out. This can be seen by setting the animation speed to 10% of normal making it easier to reproduce. The issue is that the ListBox items are getting pointerEvents auto thanks to the user style sheet.

We can override it on all children. But this doesn't feel like a great long term solution and is hard to change in RAC/S2.

We can't apply inert to the Popover because then we lose focus before we're ready for that.

@rspbot
Copy link

rspbot commented Aug 22, 2025

@github-actions github-actions bot added the S2 label Feb 17, 2026
@snowystinger snowystinger force-pushed the fix-picker-select-after-close branch from d5d23c6 to 53e94bc Compare February 17, 2026 02:27
@github-actions github-actions bot added v3 and removed S2 labels Feb 17, 2026
@rspbot
Copy link

rspbot commented Feb 17, 2026

@rspbot
Copy link

rspbot commented Feb 17, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Picker: Clicking outside changes the picklist value

4 participants