Modal icon indicating copy to clipboard operation
Modal copied to clipboard

[BUG] Modal No Longer Opens After Update

Open jcantrel opened this issue 4 years ago • 7 comments

After updating to version 7.0 my Modals are now opening at the top of the window instead of a new layer.

Version 7.0 image

Pre-7.0 image

private async void showModal(short locationID)
    {
        IModalReference formModal = Modal!.Show<BatchHeaderLocationDialog>("", ReturnParameters(locationID), Helpers.StandardModalOptions());
        ModalResult result = await formModal.Result;
        if (!result.Cancelled)
        {
            isLoading = true;
            await grid.Reload();
            isLoading = false;
            StateHasChanged();
        }
    }
private ModalParameters ReturnParameters(short locationID)
    {
        ModalParameters parameters = new ModalParameters();
        parameters.Add("Location", locationID);
        return parameters;
    }
internal static ModalOptions StandardModalOptions()
        {
            ModalOptions options = new()
            {
                HideHeader = true,
                HideCloseButton = true,
                DisableBackgroundCancel = true,
                Position = ModalPosition.Middle
            };
            return options;
        }

jcantrel avatar Oct 03 '22 13:10 jcantrel

After further testing I see this error message in the console, but I checked and my set up still matches the Getting Started page in the documentation.

image

jcantrel avatar Oct 03 '22 13:10 jcantrel

I experienced that too. I had to roll back to 7.0.0.pieview.2

as-srandall avatar Oct 04 '22 05:10 as-srandall

Hi @jcantrel,

Can you provide a repro project? I'm guessing this could be an error in setting up Blazored Modal as blazored.moidal.js doesn't exist anymore so your project shouldn't be trying to load it.

chrissainty avatar Oct 04 '22 06:10 chrissainty

Same here. Unforutnately a big project with SQL Service behind, so providing a repro is not feasable

digitalsigi avatar Oct 07 '22 11:10 digitalsigi

Same here. Unforutnately a big project with SQL Service behind, so providing a repro is not feasable

Installing 7.0.0.prieview.2

digitalsigi avatar Oct 07 '22 11:10 digitalsigi

@digitalsigi This is most likely a local issue within your application. As you can't provide a repro I'm going to close the issue. If you do manage to create one I'll take a look.

chrissainty avatar Oct 12 '22 12:10 chrissainty

I had the same issue and I was able to fix it by using !important to the display: flex in the css class we pass to the modal when it it created using options.PositionCustomClass = admin-modal-overlay

where

.admin-modal-overlay {
    display: flex !important;
    z-index: 1300;
    align-items: center;
    justify-content: center;
}

LoupaLoupa avatar Feb 21 '23 15:02 LoupaLoupa