Issue Description:
When using the ReactGoogleAutocomplete component inside a Radix UI dialog, the place selection works fine when navigating with the keyboard and pressing "Enter". However, when trying to select a place using a mouse click, the dropdown closes without selecting the place, and the input remains unchanged.
Steps to Reproduce:
- Integrate the ReactGoogleAutocomplete component inside a Radix UI dialog.
- Open the dialog and start typing in the autocomplete input.
- Use the mouse to click on one of the suggested places from the dropdown.
Expected Behavior:
The selected place should populate the input field when clicked with the mouse.
Actual Behavior:
Clicking on a place in the dropdown does not populate the input field. Instead, the dropdown closes, and the input field remains unchanged.
Additional Information:
The issue seems to stem from the fact that the Radix UI dialog and the autocomplete dropdown are rendered outside of the main div, causing conflicts in handling the click events.
Placing the ReactGoogleAutocomplete component outside of the Radix UI dialog works as expected.
Environment:
@radix-ui/react-dialog: "^1.0.4",
react-google-autocomplete: "^2.7.3",
Browser: Chrome,
OS: Ubuntu 22.04.3 LTS
Issue Description:
When using the ReactGoogleAutocomplete component inside a Radix UI dialog, the place selection works fine when navigating with the keyboard and pressing "Enter". However, when trying to select a place using a mouse click, the dropdown closes without selecting the place, and the input remains unchanged.
Steps to Reproduce:
Expected Behavior:
The selected place should populate the input field when clicked with the mouse.
Actual Behavior:
Clicking on a place in the dropdown does not populate the input field. Instead, the dropdown closes, and the input field remains unchanged.
Additional Information:
The issue seems to stem from the fact that the Radix UI dialog and the autocomplete dropdown are rendered outside of the main div, causing conflicts in handling the click events.
Placing the ReactGoogleAutocomplete component outside of the Radix UI dialog works as expected.
Environment:
@radix-ui/react-dialog: "^1.0.4",
react-google-autocomplete: "^2.7.3",
Browser: Chrome,
OS: Ubuntu 22.04.3 LTS