Skip to content

component events should mask event propagation. #4059

@mhevery

Description

@mhevery
@Component({
  selector: 'my-component'
  events: ['change']
})
@View({
  template: '<input (change)="...">'
})
class MyComponent {
} 

The above code creates an issue. It conflates the change event from the MyComponent with the bubbling change event from the <input>.

The correct behavior is that the change event which is part of the components should filter out the DOM change events. Otherwise

<my-component (change)="doSomething($event)">

will sometimes get the $event from the MyComponent and sometimes from the input event.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions