This version focuses on bug fixes across Dialog, Portal, Radio, Combobox, and MenuButton, along with improvements to how portals behave inside fullscreen elements, how dialogs handle events in popup windows, and how Radio groups automatically generate unique name attributes.
Fixed events not handled in popup windows
Dialog and components that extend it, such as Menu and Popover, now handle events correctly when rendered in a popup window opened via window.open(). hideOnEscape, hideOnInteractOutside, and focus restoration now use the content element's ownerDocument instead of the main window's document for event listeners.
Fixed Portal not rendering inside fullscreen elements
Portal was always appended to document.body, which made it invisible when an ancestor element entered fullscreen mode via the Fullscreen API. Portals are now automatically moved to document.fullscreenElement when it's active, and back to document.body when fullscreen is exited.
Auto-generated name attribute for Radio
Radio now automatically uses the RadioGroup store's id as the default name attribute when no explicit name prop is provided. This ensures consecutive RadioGroup components have unique names, preventing the browser from treating all radio inputs as a single group and fixing Tab navigation and form submission issues.
Other updates
- Fixed
Comboboxpressing Enter from submitting a parent form when the popover is open but has no matching items. - Fixed
Dialognot removingdata-enterwhen closed after using therenderprop to wrap the dialog element in an outer element. - Fixed
Dialognot restoring focus to the disclosure element when the dialog was opened and closed quickly in succession. - Fixed
MenuButtonaria-haspopupattribute changing from"menu"to"dialog"when opening a menu that contains a combobox. - Fixed
renderprop merging when the rendered element passes falsyclassNameor event handler values such asundefinedornull. - Fixed
Math.random()being called unconditionally when creating composite stores (useTabStore,useComboboxStore,useSelectStore, etc.), even when an explicitidprop was provided. This was causing Next.js build errors withcacheComponentsenabled. - Updated dependencies:
@ariakit/core@0.4.20