react-bootstrap icon indicating copy to clipboard operation
react-bootstrap copied to clipboard

OverlayTrigger rootClose does not work in shadow dom

Open andrius-kurtinaitis opened this issue 1 year ago • 1 comments

Prerequisites

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 avatar Apr 01 '23 12:04 andrius-kurtinaitis

@andrius-kurtinaitis can you post a video or something to make things more clear ?

abhip167 avatar Aug 11 '23 15:08 abhip167