From f3cd5b9c21e75794b689f8f4ba33d5dfec3d2fd9 Mon Sep 17 00:00:00 2001 From: Ryan Schmukler Date: Sun, 5 Apr 2015 21:05:23 -0400 Subject: [PATCH] fix(select): fix scrollbar margin of select parent closes #1880 --- src/components/select/select.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/select/select.js b/src/components/select/select.js index d25a43aa5cd..1bba41a1687 100755 --- a/src/components/select/select.js +++ b/src/components/select/select.js @@ -731,6 +731,9 @@ function SelectProvider($$interimElementProvider) { if (opts.disableParentScroll) { opts.disableTarget = opts.parent.find('md-content'); if (!opts.disableTarget.length) opts.disableTarget = opts.parent; + if ($mdUtil.floatingScrollbars()) { + opts.disableTarget.css('margin-right', '16px'); + } opts.lastOverflow = opts.disableTarget.css('overflow'); opts.disableTarget.css('overflow', 'hidden'); } @@ -857,6 +860,7 @@ function SelectProvider($$interimElementProvider) { if (opts.disableParentScroll && $mdUtil.floatingScrollbars()) { opts.disableTarget.css('overflow', opts.lastOverflow); + opts.disableTarget.css('margin-right', '0px'); delete opts.lastOverflow; delete opts.disableTarget; }