Skip to content

[LoginOverlay] Events on slotted content do not work #269

@sissbruecker

Description

@sissbruecker

When adding a button with a click handler to the login overlay's footer or custom form area, then the handler is never called when clicking the button:

<LoginOverlay opened>
    <div slot="footer">
        <button onClick={() => console.log('click')}>foo</button>
    </div>
</LoginOverlay>

It looks like the web component contains some logic for teleporting the content from the base element to the overlay, thus manipulating the DOM rendered by React, which might then interfere with React's event system.

Instead we should probably use whatever solution other React components like Dialog use to teleport the content. Might also be an opportunity to add a more React-like API where a JSX element is passed as a prop for example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions