This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Commit a3477a8 1 parent 1ae16cb commit a3477a8 Copy full SHA for a3477a8
File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ md-select-menu.md-THEME_NAME-theme {
64
64
}
65
65
}
66
66
}
67
- md-option :focus:not ([selected ]) {
67
+ md-option :focus:not ([disabled ]) :not ([ selected ]) {
68
68
background : ' {{background-200}}' ;
69
69
}
70
70
Original file line number Diff line number Diff line change @@ -1199,14 +1199,16 @@ function SelectProvider($$interimElementProvider) {
1199
1199
if ( ev && ( ev . type == 'mouseup' ) && ( ev . currentTarget != dropDown [ 0 ] ) ) return ;
1200
1200
if ( mouseOnScrollbar ( ) ) return ;
1201
1201
1202
- if ( ! selectCtrl . isMultiple ) {
1203
- opts . restoreFocus = true ;
1202
+ var option = $mdUtil . getClosest ( ev . target , 'md-option' ) ;
1203
+ if ( option && option . hasAttribute && ! option . hasAttribute ( 'disabled' ) ) {
1204
+ if ( ! selectCtrl . isMultiple ) {
1205
+ opts . restoreFocus = true ;
1204
1206
1205
- $mdUtil . nextTick ( function ( ) {
1206
- $mdSelect . hide ( selectCtrl . ngModel . $viewValue ) ;
1207
- } , true ) ;
1207
+ $mdUtil . nextTick ( function ( ) {
1208
+ $mdSelect . hide ( selectCtrl . ngModel . $viewValue ) ;
1209
+ } , true ) ;
1210
+ }
1208
1211
}
1209
-
1210
1212
/**
1211
1213
* check if the mouseup event was on a scrollbar
1212
1214
*/
You can’t perform that action at this time.
0 commit comments