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

Commit 9fce4b9

Browse files
committed
refactor(bottomSheet): make bottom sheet use mdUtil.disableScrollAround
references #2289
1 parent db815db commit 9fce4b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/bottomSheet/bottomSheet.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ function MdBottomSheetProvider($$interimElementProvider) {
160160
$mdTheming.inherit(bottomSheet.element, options.parent);
161161

162162
if (options.disableParentScroll) {
163-
options.lastOverflow = options.parent.css('overflow');
164-
options.parent.css('overflow', 'hidden');
163+
options.restoreScroll = $mdUtil.disableScrollAround(options.parent);
165164
}
166165

167166
return $animate.enter(bottomSheet.element, options.parent)
@@ -192,8 +191,8 @@ function MdBottomSheetProvider($$interimElementProvider) {
192191
$animate.leave(backdrop);
193192
return $animate.leave(bottomSheet.element).then(function() {
194193
if (options.disableParentScroll) {
195-
options.parent.css('overflow', options.lastOverflow);
196-
delete options.lastOverflow;
194+
options.restoreScroll();
195+
delete options.restoreScroll;
197196
}
198197

199198
bottomSheet.cleanup();

0 commit comments

Comments
 (0)