Modal icon indicating copy to clipboard operation
Modal copied to clipboard

[Bug] Background content scrollable when modal is open

Open 3hxx opened this issue 3 years ago • 5 comments

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?):

  • Blazor Server

3hxx avatar Aug 03 '22 23:08 3hxx

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

chrissainty avatar Aug 04 '22 08:08 chrissainty

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

3hxx avatar Aug 05 '22 21:08 3hxx

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.

chrissainty avatar Aug 15 '22 21:08 chrissainty

@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](https://user-images.githubusercontent.com/23142259/222758354-1b885b15-46c2-471e-8fef-c36521eed414.png)

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 :)

LePtitJoNadeau avatar Mar 03 '23 15:03 LePtitJoNadeau

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

MarkusG avatar Jul 05 '23 21:07 MarkusG