Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
refactor(bottomSheet): make bottom sheet use mdUtil.disableScrollAround
Browse files Browse the repository at this point in the history
references #2289
  • Loading branch information
rschmukler committed Aug 15, 2015
1 parent db815db commit 9fce4b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/bottomSheet/bottomSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ function MdBottomSheetProvider($$interimElementProvider) {
$mdTheming.inherit(bottomSheet.element, options.parent);

if (options.disableParentScroll) {
options.lastOverflow = options.parent.css('overflow');
options.parent.css('overflow', 'hidden');
options.restoreScroll = $mdUtil.disableScrollAround(options.parent);
}

return $animate.enter(bottomSheet.element, options.parent)
Expand Down Expand Up @@ -192,8 +191,8 @@ function MdBottomSheetProvider($$interimElementProvider) {
$animate.leave(backdrop);
return $animate.leave(bottomSheet.element).then(function() {
if (options.disableParentScroll) {
options.parent.css('overflow', options.lastOverflow);
delete options.lastOverflow;
options.restoreScroll();
delete options.restoreScroll;
}

bottomSheet.cleanup();
Expand Down

0 comments on commit 9fce4b9

Please sign in to comment.