feat(core): remove the (^ syntax and make all DOM events bubbling
BREAKING CHANGE Before <div (^click)="onEventHandler()"> <button></button> </div> After <div (click)="onEventHandler()"> <button></button> </div> Closes #3864
This commit is contained in:
@ -9,7 +9,7 @@ import {isPresent} from 'angular2/src/core/facade/lang';
|
||||
@Component({
|
||||
selector: '[md-button]:not(a), [md-fab]:not(a), [md-raised-button]:not(a)',
|
||||
host: {
|
||||
'(^mousedown)': 'onMousedown()',
|
||||
'(mousedown)': 'onMousedown()',
|
||||
'(focus)': 'onFocus()',
|
||||
'(blur)': 'onBlur()',
|
||||
'[class.md-button-focus]': 'isKeyboardFocused',
|
||||
@ -50,8 +50,8 @@ export class MdButton {
|
||||
properties: ['disabled'],
|
||||
lifecycle: [LifecycleEvent.OnChanges],
|
||||
host: {
|
||||
'(^click)': 'onClick($event)',
|
||||
'(^mousedown)': 'onMousedown()',
|
||||
'(click)': 'onClick($event)',
|
||||
'(mousedown)': 'onMousedown()',
|
||||
'(focus)': 'onFocus()',
|
||||
'(blur)': 'onBlur()',
|
||||
'[tabIndex]': 'tabIndex',
|
||||
|
@ -1,6 +1,6 @@
|
||||
<style>@import "package:angular2_material/src/components/checkbox/checkbox.css";</style>
|
||||
|
||||
<div (^click)="toggle($event)">
|
||||
<div (click)="toggle($event)">
|
||||
<div class="md-checkbox-container">
|
||||
<div class="md-checkbox-icon"></div>
|
||||
</div>
|
||||
|
@ -206,7 +206,7 @@ export class MdDialogConfig {
|
||||
host: {
|
||||
'class': 'md-dialog',
|
||||
'tabindex': '0',
|
||||
'(body:^keydown)': 'documentKeypress($event)',
|
||||
'(body:keydown)': 'documentKeypress($event)',
|
||||
},
|
||||
})
|
||||
@View({
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<label role="radio" class="md-radio-root"
|
||||
[class.md-radio-checked]="checked"
|
||||
(^click)="select($event)">
|
||||
(click)="select($event)">
|
||||
<!-- The actual `radio` part of the control. -->
|
||||
<div class="md-radio-container">
|
||||
<div class="md-radio-off"></div>
|
||||
|
@ -41,7 +41,7 @@ var _uniqueIdCounter: number = 0;
|
||||
'[attr.aria-disabled]': 'disabled',
|
||||
'[attr.aria-activedescendant]': 'activedescendant',
|
||||
// TODO(jelbourn): Remove ^ when event retargeting is fixed.
|
||||
'(^keydown)': 'onKeydown($event)',
|
||||
'(keydown)': 'onKeydown($event)',
|
||||
'[tabindex]': 'tabindex',
|
||||
}
|
||||
})
|
||||
|
@ -1,6 +1,6 @@
|
||||
<style>@import "package:angular2_material/src/components/switcher/switch.css";</style>
|
||||
|
||||
<div (^click)="toggle($event)">
|
||||
<div (click)="toggle($event)">
|
||||
<div class="md-switch-container">
|
||||
<div class="md-switch-bar"></div>
|
||||
<div class="md-switch-thumb-container">
|
||||
|
Reference in New Issue
Block a user