Skip to content

[Blazor] InputText binding is not supported well with Shadow DOM elements #60885

Open
@Poppyto

Description

@Poppyto

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I use a web component library which create input elements within shadow DOM (shadowRoot property).
Let's call it <super-input>
I overrided InputText content with .

When using @Bind on the value with oninput event, it doesn't work as well as the InputText or html input element. Characters could be sent weirdly depending the connection, and the use or websocket or no, and specially when the typing is fast.

I already digged into the problem and found a fix on my branch : https://github.com/Poppyto/aspnetcore/tree/poppyto/use-shadow-input-with-binding

The idea is to relay on event.composedPath().find(_=>true) instead of event.target when dealing with some events.

I would be happy to discuss about this bug

Expected Behavior

The typing must be smooth

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.help wantedUp for grabs. We would accept a PR to help resolve this issue

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions