@@ -50,7 +50,6 @@ let nextId = 0;
5050 '[class.mat-checked]' : 'checked' ,
5151 '[class.mat-disabled]' : 'disabled' ,
5252 '[class.mat-slide-toggle-label-before]' : 'labelPosition == "before"' ,
53- '(mousedown)' : '_setMousedown()'
5453 } ,
5554 templateUrl : 'slide-toggle.html' ,
5655 styleUrls : [ 'slide-toggle.css' ] ,
@@ -66,7 +65,6 @@ export class MdSlideToggle implements OnDestroy, AfterContentInit, ControlValueA
6665 // A unique id for the slide-toggle. By default the id is auto-generated.
6766 private _uniqueId = `md-slide-toggle-${ ++ nextId } ` ;
6867 private _color : string ;
69- private _isMousedown : boolean = false ;
7068 private _slideRenderer : SlideToggleRenderer = null ;
7169 private _disabled : boolean = false ;
7270 private _required : boolean = false ;
@@ -175,15 +173,6 @@ export class MdSlideToggle implements OnDestroy, AfterContentInit, ControlValueA
175173 event . stopPropagation ( ) ;
176174 }
177175
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-
187176 /** Implemented as part of ControlValueAccessor. */
188177 writeValue ( value : any ) : void {
189178 this . checked = value ;
0 commit comments