You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug]: Dropdown options unselectable on React 19 — react-popper panel never positions when building web from source #9857
When the web app is built from source (v1.4.2, React 19.2.8), dropdown panels open but options cannot be selected. Affected dropdowns include state, priority, member, cycle, module, estimate, project and intake — e.g. in the "create work item" modal, clicking any option in the state dropdown does nothing.
Steps to Reproduce
Build web from source using apps/web/Dockerfile.web (turbo prune → pnpm turbo run build --filter=web).
Open the web app, create/open any work item modal.
Open the state (or priority/cycle/module/member) dropdown.
Click any option — nothing happens. No network request, no console error.
Root Cause
react-popper@2.3.0 receives the trigger button and panel DOM through callback refs (ref={setReferenceElement} / ref={setPopperElement} wired to useState setters). Under React 19, a disrupted render can drop those callback invocations, leaving the state null forever. usePopper's layout effect then returns early on its null guard, createPopper never runs (the panel has no data-popper-placement attribute), Combobox.Options stays at 0x0, and headlessui classifies every option click as an outside click.
Evidence collected from a live repro (React fiber inspection): referenceElement resolves to the button, popperElement stays null, styles.popper remains {position:'absolute',left:'0',top:'0'}, zero requests on click. Manually applying the expected fixed positioning to the panel makes option clicks work immediately.
Note: pnpm-workspace.yaml already documents that react-popper 2.3.0 was accepted on React 19 ("only uses hooks — runs unchanged"). That analysis holds for the happy path, but not for ref callbacks dropped across render interruptions.
Environment
Self-hosted, built from source @ v1.4.2 (makeplane/plane master)
Add DOM-recovery effects next to each usePopper call: when the ref state is null while the dropdown is open, locate the mounted trigger button / currently open panel (ul[data-headlessui-state="open"]) and feed it back into popper. A PR with this recovery for the affected dropdown components follows. Long-term, migrating off the archived react-popper to @floating-ui/react would remove the whole class of issues.
Hi! I'd like to work on this issue. I was able to understand the reported React 19 + react-popper ref handling problem, and I'd like to investigate the affected dropdown components and add a regression test/fix. Please let me know if I can take this up.
We hit this on a self-hosted build (React 19.2.8, @headlessui/react 2.2.10, react-popper 2.3.0) and traced it to Headless UI. It doesn't come from React dropping ref callbacks on interrupted renders: it is deterministic and happens on every open.
Root cause
ComboboxOptions wraps its children in an internal <Frozen> component (src/internal/frozen.tsx) and renders it without a ref. Frozen then does:
ref is null there, and in React 19 cloneElement(child, { ref: null }) overwrites the child's own ref prop. Every combobox dropdown in Plane puts ref={setPopperElement} on the single <div> directly inside <Combobox.Options>. So that ref never fires, popperElement stays null, usePopper never creates an instance, and the panel keeps react-popper's initial position: absolute; left: 0; top: 0, the top-left corner. Only Combobox uses Frozen, which is why the Listbox/Menu/Popover-based dropdowns are fine. The code is unchanged on Headless UI's main.
We confirmed it with a minimal React 19 + jsdom render that mirrors MemberOptions. Unpatched, the panel ref never fires and the inline style stays left: 0px; top: 0px. Patched, popper attaches and positions the panel against the trigger.
Fix: one line, as a pnpm patch
This is the same idea as #9751: only clone when a ref is actually forwarded.
Patching dist/internal/frozen.js (the ESM build, which Vite resolves through the package's import export) is enough for web/admin/space. Nothing in the build loads the CJS bundles.
Headless UI v2 comboboxes are modal by default, which marks everything outside the button, input and options inert. When a dropdown renders its search Combobox.Input inside the options panel, the option list itself ends up inert. Instead of patching useInertOthers as #9751 does, passing modal={false} to Combobox.Options restores the v1 behaviour. We needed it on:
The date pickers matter too. With modal on, v2 applies its scroll lock and inert handling while the picker is open, so the next dropdown takes two clicks to open.
We've deployed both changes. Happy to open a PR if that helps.
Activity
VishakhaSahu05 commentedon Oct 3, 2026
Hi! I'd like to work on this issue. I was able to understand the reported React 19 + react-popper ref handling problem, and I'd like to investigate the affected dropdown components and add a regression test/fix. Please let me know if I can take this up.
GaafarBBK commentedon Oct 26, 2026
We hit this on a self-hosted build (React 19.2.8,
@headlessui/react2.2.10,react-popper2.3.0) and traced it to Headless UI. It doesn't come from React dropping ref callbacks on interrupted renders: it is deterministic and happens on every open.Root cause
ComboboxOptionswraps its children in an internal<Frozen>component (src/internal/frozen.tsx) and renders it without a ref.Frozenthen does:refisnullthere, and in React 19cloneElement(child, { ref: null })overwrites the child's ownrefprop. Every combobox dropdown in Plane putsref={setPopperElement}on the single<div>directly inside<Combobox.Options>. So that ref never fires,popperElementstaysnull,usePoppernever creates an instance, and the panel keeps react-popper's initialposition: absolute; left: 0; top: 0, the top-left corner. OnlyComboboxusesFrozen, which is why the Listbox/Menu/Popover-based dropdowns are fine. The code is unchanged on Headless UI'smain.We confirmed it with a minimal React 19 + jsdom render that mirrors
MemberOptions. Unpatched, the panel ref never fires and the inline style staysleft: 0px; top: 0px. Patched, popper attaches and positions the panel against the trigger.Fix: one line, as a pnpm patch
This is the same idea as #9751: only clone when a ref is actually forwarded.
Patching
dist/internal/frozen.js(the ESM build, which Vite resolves through the package'simportexport) is enough for web/admin/space. Nothing in the build loads the CJS bundles.Related: options visible but not clickable
Headless UI v2 comboboxes are
modalby default, which marks everything outside the button, input and options inert. When a dropdown renders its searchCombobox.Inputinside the options panel, the option list itself ends up inert. Instead of patchinguseInertOthersas #9751 does, passingmodal={false}toCombobox.Optionsrestores the v1 behaviour. We needed it on:apps/web/core/components/dropdowns/:cycle/cycle-options,estimate,intake-state/base,member/member-options,module/module-options,priority,project/base,state/base,date,date-rangeapps/web/core/components/issues/:issue-detail/label/select/label-select,issue-layouts/properties/label-dropdown,select/basepackages/ui/src/:dropdowns/custom-search-select,dropdowns/custom-select,dropdown/single-selectThe date pickers matter too. With
modalon, v2 applies its scroll lock and inert handling while the picker is open, so the next dropdown takes two clicks to open.We've deployed both changes. Happy to open a PR if that helps.