Skip to content

Commit 76e4f56

Browse files
committed
fix(button): remove ref to Event global (for node)
1 parent d4a3cde commit 76e4f56

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/button/button.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ViewEncapsulation,
44
Input,
55
HostBinding,
6-
HostListener,
76
ChangeDetectionStrategy,
87
ElementRef,
98
Renderer,
@@ -22,7 +21,7 @@ import {
2221
'[class.md-button-focus]': 'isKeyboardFocused',
2322
'(mousedown)': 'setMousedown()',
2423
'(focus)': 'setKeyboardFocus()',
25-
'(blur)': 'removeKeyboardFocus()'
24+
'(blur)': 'removeKeyboardFocus()',
2625
},
2726
templateUrl: './components/button/button.html',
2827
styleUrls: ['./components/button/button.css'],
@@ -85,7 +84,8 @@ export class MdButton {
8584
'[class.md-button-focus]': 'isKeyboardFocused',
8685
'(mousedown)': 'setMousedown()',
8786
'(focus)': 'setKeyboardFocus()',
88-
'(blur)': 'removeKeyboardFocus()'
87+
'(blur)': 'removeKeyboardFocus()',
88+
'(click)': 'haltDisabledEvents($event)',
8989
},
9090
templateUrl: './components/button/button.html',
9191
styleUrls: ['./components/button/button.css'],
@@ -118,7 +118,6 @@ export class MdAnchor extends MdButton {
118118
this._disabled = (value != null && value != false) ? true : null;
119119
}
120120

121-
@HostListener('click', ['$event'])
122121
haltDisabledEvents(event: Event) {
123122
// A disabled button shouldn't apply any actions
124123
if (this.disabled) {

0 commit comments

Comments
 (0)