File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,17 @@ describe('MdSlider without forms', () => {
141
141
expect ( sliderNativeElement . classList ) . not . toContain ( 'mat-slider-sliding' ) ;
142
142
} ) ;
143
143
144
+ it ( 'should remove focus after the slider is updated' , ( ) => {
145
+ spyOn ( sliderNativeElement , 'blur' ) ;
146
+
147
+ expect ( sliderNativeElement . blur ) . not . toHaveBeenCalled ( ) ;
148
+
149
+ dispatchClickEventSequence ( sliderNativeElement , 0.39 ) ;
150
+ fixture . detectChanges ( ) ;
151
+
152
+ expect ( sliderNativeElement . blur ) . toHaveBeenCalled ( ) ;
153
+ } ) ;
154
+
144
155
it ( 'should have thumb gap when at min value' , ( ) => {
145
156
expect ( trackFillElement . style . transform ) . toContain ( 'translateX(-7px)' ) ;
146
157
} ) ;
Original file line number Diff line number Diff line change @@ -445,6 +445,7 @@ export class MdSlider extends _MdSliderMixinBase
445
445
this . _emitInputEvent ( ) ;
446
446
this . _emitChangeEvent ( ) ;
447
447
}
448
+ this . _elementRef . nativeElement . blur ( ) ;
448
449
}
449
450
450
451
_onSlide ( event : HammerInput ) {
You can’t perform that action at this time.
0 commit comments