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 @@ -588,7 +588,7 @@ function SelectProvider($$interimElementProvider) {
588588 } ) ;
589589 } ) ;
590590
591- return $mdUtil . transitionEndPromise ( opts . selectEl ) ;
591+ return $mdUtil . transitionEndPromise ( opts . selectEl , { timeout : 100 } ) ;
592592
593593 function configureAria ( ) {
594594 opts . selectEl . attr ( 'aria-labelledby' , opts . target . attr ( 'id' ) ) ;
Original file line number Diff line number Diff line change @@ -74,16 +74,18 @@ angular.module('material.core')
7474 node . dispatchEvent ( newEvent ) ;
7575 } ,
7676
77- transitionEndPromise : function ( element ) {
77+ transitionEndPromise : function ( element , opts ) {
78+ opts = opts || { } ;
7879 var deferred = $q . defer ( ) ;
7980 element . on ( $mdConstant . CSS . TRANSITIONEND , finished ) ;
8081 function finished ( ev ) {
8182 // Make sure this transitionend didn't bubble up from a child
82- if ( ev . target === element [ 0 ] ) {
83+ if ( ! ev || ev . target === element [ 0 ] ) {
8384 element . off ( $mdConstant . CSS . TRANSITIONEND , finished ) ;
8485 deferred . resolve ( ) ;
8586 }
8687 }
88+ if ( opts . timeout ) $timeout ( finished , opts . timeout ) ;
8789 return deferred . promise ;
8890 } ,
8991
You can’t perform that action at this time.
0 commit comments