Skip to content

fix: combobox interactoutside#9646

Merged
reidbarber merged 3 commits intomainfrom
fix-combobox-interactoutside
Feb 24, 2026
Merged

fix: combobox interactoutside#9646
reidbarber merged 3 commits intomainfrom
fix-combobox-interactoutside

Conversation

@snowystinger
Copy link
Member

Closes #5338

Also fixes an issue where a combobox inside of a shadow dom couldn't be closed by clicking outside, seen here
#9632

✅ 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:

In the new story

  1. open dialog
  2. open combobox
  3. click outside on the dialog's underlay
  4. it should close

🧢 Your Project:

@rspbot
Copy link

rspbot commented Feb 15, 2026

## API Changes

react-aria-components

/react-aria-components:TreeHeader

-TreeHeader {
-  children?: ReactNode
-  className?: string
-  id?: string
-  render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
-  style?: CSSProperties
-}

/react-aria-components:TreeSection

-TreeSection <T extends {}> {
-  aria-label?: string
-  children?: ReactNode | ({}) => ReactElement
-  className?: string
-  dependencies?: ReadonlyArray<any>
-  id?: Key
-  items?: Iterable<{}>
-  render?: DOMRenderFunction<keyof React.JSX.IntrinsicElements, undefined>
-  style?: CSSProperties
-  value?: {}
-}

@react-spectrum/s2

/@react-spectrum/s2:Picker

 Picker <M extends SelectionMode = 'single', T extends {}> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   align?: 'start' | 'end' = 'start'
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoComplete?: string
   autoFocus?: boolean
   children: ReactNode | ({}) => ReactNode
   contextualHelp?: ReactNode
   defaultOpen?: boolean
   defaultValue?: ValueType<SelectionMode>
   dependencies?: ReadonlyArray<any>
   description?: ReactNode
   direction?: 'bottom' | 'top' = 'bottom'
   disabledKeys?: Iterable<Key>
   errorMessage?: ReactNode | (ValidationResult) => ReactNode
   excludeFromTabOrder?: boolean
   form?: string
   id?: string
   isDisabled?: boolean
   isInvalid?: boolean
   isOpen?: boolean
   isQuiet?: boolean
   isRequired?: boolean
   items?: Iterable<T>
   label?: ReactNode
   labelAlign?: Alignment = 'start'
   labelPosition?: LabelPosition = 'top'
   loadingState?: LoadingState
   menuWidth?: number
   name?: string
   necessityIndicator?: NecessityIndicator = 'icon'
   onBlur?: (FocusEvent<Target>) => void
   onChange?: (ChangeValueType<SelectionMode>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onKeyDown?: (KeyboardEvent) => void
   onKeyUp?: (KeyboardEvent) => void
   onLoadMore?: () => any
   onOpenChange?: (boolean) => void
   placeholder?: string = 'Select an item' (localized)
-  renderValue?: (Array<{}>) => ReactNode
   selectionMode?: SelectionMode = 'single'
   shouldFlip?: boolean = true
   size?: 'S' | 'M' | 'L' | 'XL' = 'M'
   slot?: string | null
   validate?: (ValidationType<SelectionMode>) => ValidationError | boolean | null | undefined
   validationBehavior?: 'native' | 'aria' = 'native'
   value?: ValueType<SelectionMode>
 }

/@react-spectrum/s2:PickerProps

 PickerProps <M extends SelectionMode = 'single', T extends {}> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   align?: 'start' | 'end' = 'start'
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoComplete?: string
   autoFocus?: boolean
   children: ReactNode | ({}) => ReactNode
   contextualHelp?: ReactNode
   defaultOpen?: boolean
   defaultValue?: ValueType<SelectionMode>
   dependencies?: ReadonlyArray<any>
   description?: ReactNode
   direction?: 'bottom' | 'top' = 'bottom'
   disabledKeys?: Iterable<Key>
   errorMessage?: ReactNode | (ValidationResult) => ReactNode
   excludeFromTabOrder?: boolean
   form?: string
   id?: string
   isDisabled?: boolean
   isInvalid?: boolean
   isOpen?: boolean
   isQuiet?: boolean
   isRequired?: boolean
   items?: Iterable<T>
   label?: ReactNode
   labelAlign?: Alignment = 'start'
   labelPosition?: LabelPosition = 'top'
   loadingState?: LoadingState
   menuWidth?: number
   name?: string
   necessityIndicator?: NecessityIndicator = 'icon'
   onBlur?: (FocusEvent<Target>) => void
   onChange?: (ChangeValueType<SelectionMode>) => void
   onFocus?: (FocusEvent<Target>) => void
   onFocusChange?: (boolean) => void
   onKeyDown?: (KeyboardEvent) => void
   onKeyUp?: (KeyboardEvent) => void
   onLoadMore?: () => any
   onOpenChange?: (boolean) => void
   placeholder?: string = 'Select an item' (localized)
-  renderValue?: (Array<{}>) => ReactNode
   selectionMode?: SelectionMode = 'single'
   shouldFlip?: boolean = true
   size?: 'S' | 'M' | 'L' | 'XL' = 'M'
   slot?: string | null
   validate?: (ValidationType<SelectionMode>) => ValidationError | boolean | null | undefined
   validationBehavior?: 'native' | 'aria' = 'native'
   value?: ValueType<SelectionMode>
 }

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.

LGTM

@reidbarber reidbarber added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit 50e009e Feb 24, 2026
29 checks passed
@reidbarber reidbarber deleted the fix-combobox-interactoutside branch February 24, 2026 18:20
pioug pushed a commit to pioug/react-spectrum that referenced this pull request Feb 28, 2026
…aseline-tracker

* origin/main:
  feat(S2): S2 ListView (adobe#8878)
  refactor: Centralize expandedKeys logic in TreeCollection (adobe#9711)
  chore: Warn if user has interactive elements in their custom Picker value (adobe#9710)
  feat: S2 unavailable menu item (adobe#9657)
  fix: Ensure that opening a submenu via enter/space moves focus to first item in submenu (adobe#9691)
  fix: prevent docs crash by making template elements always append children into .content (adobe#9703)
  docs(RAC): Add TreeSection docs (adobe#9699)
  docs(S2): add Typography search view (adobe#9524)
  docs(S2): fix clipping in Picker custom value AvatarGroup example (adobe#9702)
  fix: patch additional methods so React doesnt break with template elements (adobe#9385)
  tentative fix (adobe#9635)
  docs(S2): fix icon import clipboard content to add underscore for icons starting with number (adobe#9698)
  feat(S2): add ActionBar support to TreeView (adobe#9695)
  fix: combobox interactoutside (adobe#9646)
  fix: skip native Date fast path when local timezone is overridden via setLocalTimeZone (adobe#9678)
  chore: update storybook to 9 (adobe#8634)
  docs: improve custom render value S2 Picker example (adobe#9682)

# Conflicts:
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment