react-bootstrap
react-bootstrap copied to clipboard
OverlayTrigger rootClose does not work in shadow dom
Prerequisites
- [X] I am using the correct version of React-Bootstrap for my version of Bootstrap
- [X] I have searched for duplicate or closed issues
- [X] I have read the contributing guidelines
Describe the bug
If react app is in shadow dom and rootClose={true}, then the popover does not show at all. If rootClose={false}, then it does shop up, but it does not close when clicking outside the trigger button.
Expected behavior
Popover should show up after clicking the button and close after clicking outside.
To Reproduce
Click the button "Click me to see".
Reproducible Example
This works like expected: https://codesandbox.io/s/peaceful-sky-xuss13?file=/src/App.js This sandbox puts the app into shadow dom and the click does not work: https://codesandbox.io/s/zealous-maria-zyh1iz?file=/src/App.js If changed to rootClose={false}, the popup shows up, but does not close after clicking outside.
Screenshots
No response
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of React-Bootstrap are you using?
2.7.2
What version of Bootstrap are you using?
5
Additional context
No response
@andrius-kurtinaitis can you post a video or something to make things more clear ?