@@ -50,7 +50,6 @@ let nextId = 0;
50
50
'[class.mat-checked]' : 'checked' ,
51
51
'[class.mat-disabled]' : 'disabled' ,
52
52
'[class.mat-slide-toggle-label-before]' : 'labelPosition == "before"' ,
53
- '(mousedown)' : '_setMousedown()'
54
53
} ,
55
54
templateUrl : 'slide-toggle.html' ,
56
55
styleUrls : [ 'slide-toggle.css' ] ,
@@ -66,7 +65,6 @@ export class MdSlideToggle implements OnDestroy, AfterContentInit, ControlValueA
66
65
// A unique id for the slide-toggle. By default the id is auto-generated.
67
66
private _uniqueId = `md-slide-toggle-${ ++ nextId } ` ;
68
67
private _color : string ;
69
- private _isMousedown : boolean = false ;
70
68
private _slideRenderer : SlideToggleRenderer = null ;
71
69
private _disabled : boolean = false ;
72
70
private _required : boolean = false ;
@@ -175,15 +173,6 @@ export class MdSlideToggle implements OnDestroy, AfterContentInit, ControlValueA
175
173
event . stopPropagation ( ) ;
176
174
}
177
175
178
- _setMousedown ( ) {
179
- // We only *show* the focus style when focus has come to the button via the keyboard.
180
- // The Material Design spec is silent on this topic, and without doing this, the
181
- // button continues to look :active after clicking.
182
- // @see http://marcysutton.com/button-focus-hell/
183
- this . _isMousedown = true ;
184
- setTimeout ( ( ) => this . _isMousedown = false , 100 ) ;
185
- }
186
-
187
176
/** Implemented as part of ControlValueAccessor. */
188
177
writeValue ( value : any ) : void {
189
178
this . checked = value ;
0 commit comments