Skip to content

"Insert Files" in MudExRichTextEditor requires two clicks when in a MudDialog #28

@mpapaloizou

Description

@mpapaloizou

Tested:
Tested on both my personal project and this repository.

Problem:
When the MudExRichTextEditor is displayed inside a modal (MudDialog), the Insert Files toolbar button requires two clicks to open the popup dialog.

How to reproduce :
In this repository:

  1. Replace the content of Empty.razor with the code snippet below.
  2. Remove the @page "/" directive from Index.razor (to allow it to open in a dialog).
  3. Run the project and navigate to /empty.
  4. Click the "Open Editor Dialog" button.
  5. In the editor toolbar, click Insert Files — you'll notice it takes two clicks for the popup to appear. (The image I uploaded is after one click. You can notice that the button is purple (clicked) and everything else slightly gray on the background, but the insert files dialog is missing)

Image

@page "/empty"
@inject IDialogService DialogService
<MudButton OnClick="OpenEditor">Open Editor Dialog</MudButton>


@code {
    private async Task OpenEditor()
    {
        var options = new DialogOptions
            {
                FullWidth = true,
                MaxWidth = MaxWidth.ExtraLarge,
                CloseButton = true,
                CloseOnEscapeKey = true,
                BackdropClick = false,
            };

        await DialogService.ShowAsync<Index>("Editor", options);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions