Skip to content

bug(SvgEditor): The Editor HeadContent was replaced by SvgEditor #5325

@cairabbit

Description

@cairabbit

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The Blazor HeadOutlet is used to output the contents that defined in in child components. However, if there're multiple are defined, the last one would completely replace the previous content. Therefore, the assets loaded in previous won't be loaded any more.

For example, I have two components and in one page, the then won't work properly.

        <Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Inline">
          <BootstrapInput @bind-Value="@it.ClientId" />
          <BootstrapInput @bind-Value="@it.Name" />
          <MultiSelect @bind-Value="it.Type" />
          <Editor IsEditor="true" @bind-Value="it.Details" />
          <SvgEditor OnSaveChanged="@OnSaveChanged"></SvgEditor>
        </Row>

the result:

Image

this css file didn't load:
<link href="./_content/BootstrapBlazor.SummerNote/css/bootstrap.blazor.editor.min.css" rel="stylesheet" />

See dotnet/aspnetcore#51864

As this ticket was marked as not planned, it was considered as by design. So <HeadContent> might not be used in controls (or child components), Is <SectionOutlet> + <SectionContent> useful?

Expected Behavior

All the assets file should be loaded.

Interactive render mode

Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)

Steps To Reproduce

https://github.com/cairabbit/BlazorExample

see: Clients -> click "Add" button.

Exceptions (if any)

No response

.NET Version

NET9.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions