This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -701,7 +701,11 @@ function SelectProvider($$interimElementProvider) {
701701 } ) ;
702702
703703 opts . resizeFn = function ( ) {
704- animateSelect ( scope , element , opts ) ;
704+ $$rAF ( function ( ) {
705+ $$rAF ( function ( ) {
706+ animateSelect ( scope , element , opts ) ;
707+ } ) ;
708+ } ) ;
705709 } ;
706710
707711 angular . element ( $window ) . on ( 'resize' , opts . resizeFn ) ;
Original file line number Diff line number Diff line change @@ -82,14 +82,26 @@ angular.module('material.core')
8282 wrapperEl . css ( {
8383 overflow : 'hidden' ,
8484 position : 'fixed' ,
85- width : '100%' ,
85+ display : computedStyle . display ,
8686 'padding-top' : computedStyle . paddingTop ,
8787 top : ( - 1 * heightOffset ) + 'px'
8888 } ) ;
8989
90+
91+ computeSize ( ) ;
92+
93+ angular . element ( $window ) . on ( 'resize' , computeSize ) ;
94+
95+ function computeSize ( ) {
96+ wrapperEl . css ( {
97+ 'max-width' : disableTarget [ 0 ] . offsetWidth
98+ } ) ;
99+ }
100+
90101 return function restoreScroll ( ) {
91102 disableTarget . append ( wrapperEl . children ( ) ) ;
92103 wrapperEl . remove ( ) ;
104+ angular . element ( $window ) . off ( 'resize' , computeSize ) ;
93105 if ( scrollBarsShowing ) {
94106 disableTarget . css ( 'overflow-y' , restoreOverflowY || false ) ;
95107 }
You can’t perform that action at this time.
0 commit comments