diff --git a/src/components/backdrop/backdrop.scss b/src/components/backdrop/backdrop.scss index 1580271c645..e26cebfe695 100644 --- a/src/components/backdrop/backdrop.scss +++ b/src/components/backdrop/backdrop.scss @@ -21,6 +21,7 @@ md-backdrop { right: 0; &.md-click-catcher { + top: 0px; position: fixed; } diff --git a/src/components/select/select.js b/src/components/select/select.js index cd9362364b0..e4e0e9af024 100755 --- a/src/components/select/select.js +++ b/src/components/select/select.js @@ -673,7 +673,7 @@ function SelectProvider($$interimElementProvider) { }); /* @ngInject */ - function selectDefaultOptions($mdSelect, $mdConstant, $$rAF, $mdUtil, $mdTheming, $timeout) { + function selectDefaultOptions($mdSelect, $mdConstant, $$rAF, $mdUtil, $mdTheming, $timeout, $window) { return { parent: 'body', onShow: onShow, @@ -698,6 +698,14 @@ function SelectProvider($$interimElementProvider) { backdrop: opts.hasBackdrop && angular.element('') }); + opts.resizeFn = function() { + animateSelect(scope, element, opts); + }; + + angular.element($window).on('resize', opts.resizeFn); + angular.element($window).on('orientationchange', opts.resizeFn); + + configureAria(); element.removeClass('md-leave'); @@ -853,6 +861,10 @@ function SelectProvider($$interimElementProvider) { delete opts.disableTarget; } + angular.element($window).off('resize', opts.resizefn); + angular.element($window).off('orientationchange', opts.resizefn); + opts.resizeFn = undefined; + var mdSelect = opts.selectEl.controller('mdSelect'); if (mdSelect) { mdSelect.setLabelText(opts.selectEl.controller('mdSelectMenu').selectedLabels());