Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Body shifts to the right when opening a modal from within another modal #5789

Closed
dolevd opened this issue Apr 12, 2016 · 2 comments
Closed

Comments

@dolevd
Copy link
Contributor

dolevd commented Apr 12, 2016

Bug description:

When there's vertical scrolling on the body and we open a new modal, UIBS (since v. 1.3) hides the scrollbar and adds a right padding to the body to compensate (to avoid the annoying body shift issue).
This padding is removed when the modal is closed.

However, when opening a modal from another modal, the padding is added twice (incorrectly, since we only need to add the padding once), and removed only once when the second modal is closed. This leaves the body with a right padding set and the content shifted.

Please see the attached plunker for an example.

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/g3EqeQYlz97xCUrMVkD1?p=preview

To reproduce:

  1. Click the open modal link (right aligned to better demonstrate the right padding on the body).
  2. Click Open second modal to open another modal. Notice the right padding on the body was increased.
  3. Close both modals. This leaves the padding that was added after opening the first modal.

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.3

UIBS: 1.3.1

Bootstrap: 3.3.6

@wesleycho
Copy link
Contributor

@RobJacobs looks like this is the issue that never dies hah.

@RobJacobs
Copy link
Contributor

It will when I'm done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants