This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit 6e7b36c 1 parent 6aa1c8a commit 6e7b36c Copy full SHA for 6e7b36c
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ function SelectProvider($$interimElementProvider) {
588
588
} ) ;
589
589
} ) ;
590
590
591
- return $mdUtil . transitionEndPromise ( opts . selectEl ) ;
591
+ return $mdUtil . transitionEndPromise ( opts . selectEl , { timeout : 100 } ) ;
592
592
593
593
function configureAria ( ) {
594
594
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')
74
74
node . dispatchEvent ( newEvent ) ;
75
75
} ,
76
76
77
- transitionEndPromise : function ( element ) {
77
+ transitionEndPromise : function ( element , opts ) {
78
+ opts = opts || { } ;
78
79
var deferred = $q . defer ( ) ;
79
80
element . on ( $mdConstant . CSS . TRANSITIONEND , finished ) ;
80
81
function finished ( ev ) {
81
82
// Make sure this transitionend didn't bubble up from a child
82
- if ( ev . target === element [ 0 ] ) {
83
+ if ( ! ev || ev . target === element [ 0 ] ) {
83
84
element . off ( $mdConstant . CSS . TRANSITIONEND , finished ) ;
84
85
deferred . resolve ( ) ;
85
86
}
86
87
}
88
+ if ( opts . timeout ) $timeout ( finished , opts . timeout ) ;
87
89
return deferred . promise ;
88
90
} ,
89
91
You can’t perform that action at this time.
0 commit comments