Clicking outside FloatingPortal's to close all parent and child portals does not work correctly on React v16.14.0
envgap__floating-ui__floating-ui-3092
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
f65f9e2be0249e9add0299f9a3c5b79824ad6094- Manifest
packages/react-dom/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
floating-ui/floating-ui #3092 · read the original issue
Let us have several floating portals nested inside each other. For example, floating portal 1 with an input field inside and floating portal 2 with a button to change the value in the input field. When implementing this behavior using the React library version 16.14.0, a bug occurs in which in order to close both floating portals by clicking outside their tree, you have to click twice. This problem does not exist when implemented through the React library version 18.3.1. **To Reproduce** Here is a demo [sandbox](https://codesandbox.io/p/sandbox/q8wshf). Steps to reproduce the behavior: 1. Click on button 'Open Popover' 2. Input text 'open' in field to open nested Popover 3. Click outside both floating elements **Expected behavior** Clicking outside of floated elements should close both the parent and nested floated elements, as happens when using the React library version 18 **Screenshots** https://github.com/user-attachments/assets/b81f2744-82c2-4fd8-b2ec-29866f3befbe **Context:** - OS: Windows 11 - Browser: Edge - Version v.130.0.2849.46
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]