Skip to content

Multilevel shadowDoms not working as expected, popup closes on click inside target  #470

Closed
@Psvensso

Description

@Psvensso

When using the trigger inside multi level shadowDoms the "is click inside" functionality is not working as expected.
The current implementation inPopupOrChild checks if the click event target is in the popup element. Then checks if the shadow the popup belongs to is the target due to event re-targeting.

This fails when there are multiple levels of shadow so the event has been re-targeted multiple times.
This can be fixed by also checking the compostedPath of the event in useWinClick to try to find the actual click event target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions