Blazored / Modal

A powerful and customizable modal implementation for Blazor applications.
https://blazored.github.io/Modal/
MIT License
772 stars 185 forks source link

[Bug] Background content scrollable when modal is open #413

Open 3hxx opened 2 years ago

3hxx commented 2 years ago

Describe the bug When the modal is open i can still scroll down on the background content? I've tried googling it and I can't see this has been raised before?

To Reproduce Steps to reproduce the behavior: `var options = new ModalOptions() { Class = "blazored-modal-photo-select", };

    var parameters = new ModalParameters();
    var modal = ModalService.Show<AddOrRemovePhotosModal>("Edit Photos", parameters, options);`

Expected behavior I would expect the background not to be scrollable when a modal is open

Screenshots https://gyazo.com/d3086c9dadcb0153a8bf6d5a95d9ed55

Here is a gif of my behavior

Hosting Model (is this issue happening with a certain hosting model?):

chrissainty commented 2 years ago

Are you seeing this in the latest preview package or the current GA version?

3hxx commented 2 years ago

Version I am using is 7.0.0-preview.2 :)

chrissainty commented 2 years ago

This only appears to happen on mobile devices, specifically Safari on iOS. I've noticed that Bootstraps modal also has this behaviour on iOS as well.

LePtitJoNadeau commented 1 year ago

@chrissainty, On Firefox browser, (not on phone) I can reproduce a similar bug on Firefox as well.

This is my setup:

Firefox version: 110.0.1 (64-bit)

My body where the modal is open from:

image

When modal open, I can still scroll from body.

This only occur in Firefox.

I tried on: Edge Chrome

No problem with these.

Thank you very much :)

MarkusG commented 1 year ago

Also running into this issue on version 7.1.0 on Firefox and Chromium.