From f52c2c1db721e108e0b6c254eb8025b24923c909 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 15 Nov 2018 19:29:13 -0800 Subject: [PATCH] Revert "fix(modal): check for overflow hidden" This reverts commit 433e536e6b31ed61d19fc2d2b31a01b05a2b0474. This "fix" causes the general use case of being attached to the body to fail. This can be seen on the example site, past v2 the padding isn't added when it should be and the page 'jumps' when the scrollbar disappears. --- src/modal/modal.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modal/modal.js b/src/modal/modal.js index 7cf12a1164..6dae10fba2 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -439,11 +439,9 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.sta } $compile(backdropDomEl)(backdropScope); $animate.enter(backdropDomEl, appendToElement); - if ($uibPosition.isScrollable(appendToElement)) { - scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement); - if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - appendToElement.css({paddingRight: scrollbarPadding.right + 'px'}); - } + scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement); + if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { + appendToElement.css({paddingRight: scrollbarPadding.right + 'px'}); } }