preline icon indicating copy to clipboard operation
preline copied to clipboard

[Stacked overlays] Window scroll is re-enabled when the top overlay is closed irrespective of Bottom overlay.

Open naagas-syft opened this issue 1 year ago • 1 comments

Background

We are using stacked overlays. (Modal over Modal). We disable body-scroll when modal is shown. using --body-scroll:false. This disables body scroll when the modal is opened. https://github.com/htmlstreamofficial/preline/blob/main/src/plugins/overlay/index.ts#L207

When modal is closed we reset the body scroll behavior. (as shown here: https://github.com/htmlstreamofficial/preline/blob/main/src/plugins/overlay/index.ts#L262).

Bug

The closing modal should respect the configuration needed by the bottom Modal.

naagas-syft avatar Feb 14 '24 20:02 naagas-syft

Background

We are using stacked overlays. (Modal over Modal). We disable body-scroll when modal is shown. using --body-scroll:false. This disables body scroll when the modal is opened. https://github.com/htmlstreamofficial/preline/blob/main/src/plugins/overlay/index.ts#L207

When modal is closed we reset the body scroll behavior. (as shown here: https://github.com/htmlstreamofficial/preline/blob/main/src/plugins/overlay/index.ts#L262).

Bug

The closing modal should respect the configuration needed by the bottom Modal.

Thanks for noticing! We will fix this in the next update.

olegpix avatar Feb 28 '24 16:02 olegpix

Hey @naagas-syft - thanks for reporting the issue. We've just pushed the fixes in the v2.1.0 update. Thanks!

jahaganiev avatar Apr 03 '24 23:04 jahaganiev