-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Environment Information
- Package version(s): 8.29.1
Please provide a reproduction of the bug in a codepen:
- Render Callout from a shadow-dom (f.eks web-component)
Actual behavior:
Result: whatever event that is triggered from inside the Callout will trigger dismissOnClickOrScroll and closes the Callout
The reason is because isEventTargetOutsideCallout will always be true as ev.target is wrong as referred here: https://javascript.info/shadow-dom-events
Why the event is called from the light-dom whereas the hostElement is in the shadowdom is unclear. But supporting both will make the Callout more robust.
Expected behavior:
dismissOnClickOrScroll gets its target from ev.composedPath and properly calculates isEventTargetOutsideCallout.
Priorities and help requested:
Are you willing to submit a PR to fix? Yes
Requested priority: Blocking - our team cannot use Callout and related components in our project
Products/sites affected: all components using Callout under the hood
Metadata
Metadata
Assignees
Labels
Type
Projects
Status