Permalink
Browse files

{{action}} means override, so stop propagation

  • Loading branch information...
wycats committed Jun 14, 2012
1 parent 2d26a36 commit aaa22a7ced26ec4cc079818b6a8991baed51d77a
Showing with 1 addition and 0 deletions.
  1. +1 −0 packages/ember-views/lib/system/event_dispatcher.js
@@ -139,6 +139,7 @@ Ember.EventDispatcher = Ember.Object.extend(
handler = action.handler;
if (action.eventName === eventName) {
evt.stopPropagation();
return handler(evt);
}
});

3 comments on commit aaa22a7

@josepjaume

This comment has been minimized.

Show comment
Hide comment
@josepjaume

josepjaume Jun 15, 2012

Contributor

Hi,

Shouldn't it be also stopping the propagation whe clicking on <a> elements? If I use something like this, the browser changes location after the event has been fired:

<a {{action back href=true}}>Go Back</a>
Contributor

josepjaume replied Jun 15, 2012

Hi,

Shouldn't it be also stopping the propagation whe clicking on <a> elements? If I use something like this, the browser changes location after the event has been fired:

<a {{action back href=true}}>Go Back</a>
@devinus

This comment has been minimized.

Show comment
Hide comment
@devinus

devinus Jun 15, 2012

Member

Should be evt.preventDefault() instead.

Member

devinus replied Jun 15, 2012

Should be evt.preventDefault() instead.

@wycats

This comment has been minimized.

Show comment
Hide comment
@wycats

wycats Jun 15, 2012

Member

Agreed.

Member

wycats replied Jun 15, 2012

Agreed.

Please sign in to comment.